
int map_to_failure(int ret,security_context_t *con)

{
  int *piVar1;
  long lVar2;
  byte *pbVar3;
  byte *pbVar4;
  bool bVar5;
  bool bVar6;
  
  if (ret == 0) {
    piVar1 = __errno_location();
    *piVar1 = 0x5f;
    ret = -1;
  }
  else {
    bVar5 = (uint)ret < 10;
    bVar6 = ret == 10;
    if (bVar6) {
      lVar2 = 10;
      pbVar3 = (byte *)*con;
      pbVar4 = (byte *)"unlabeled";
      do {
        if (lVar2 == 0) break;
        lVar2 = lVar2 + -1;
        bVar5 = *pbVar3 < *pbVar4;
        bVar6 = *pbVar3 == *pbVar4;
        pbVar3 = pbVar3 + 1;
        pbVar4 = pbVar4 + 1;
      } while (bVar6);
      if ((!bVar5 && !bVar6) == bVar5) {
        freecon(*con);
        *con = (security_context_t)0x0;
        piVar1 = __errno_location();
        *piVar1 = 0x3d;
        ret = -1;
      }
    }
  }
  return ret;
}



uint FUN_0010a091(uint param_1,undefined8 *param_2)

{
  int *piVar1;
  long lVar2;
  byte *pbVar3;
  byte *pbVar4;
  bool bVar5;
  bool bVar6;
  
  if (param_1 == 0) {
    piVar1 = __errno_location();
    *piVar1 = 0x5f;
    param_1 = 0xffffffff;
  }
  else {
    bVar5 = param_1 < 10;
    bVar6 = param_1 == 10;
    if (bVar6) {
      lVar2 = 10;
      pbVar3 = (byte *)*param_2;
      pbVar4 = (byte *)"unlabeled";
      do {
        if (lVar2 == 0) break;
        lVar2 = lVar2 + -1;
        bVar5 = *pbVar3 < *pbVar4;
        bVar6 = *pbVar3 == *pbVar4;
        pbVar3 = pbVar3 + 1;
        pbVar4 = pbVar4 + 1;
      } while (bVar6);
      if ((!bVar5 && !bVar6) == bVar5) {
        freecon((byte *)*param_2);
        *param_2 = 0;
        piVar1 = __errno_location();
        *piVar1 = 0x3d;
        param_1 = 0xffffffff;
      }
    }
  }
  return param_1;
}


PUSH RBX
TEST EDI,EDI
JZ 0x0010a0a2
MOV EAX,EDI
MOV RBX,RSI
CMP EDI,0xa
JZ 0x0010a0b4
POP RBX
RET
CALL 0x001020a0
MOV dword ptr [RAX],0x5f
MOV EAX,0xffffffff
JMP 0x0010a0a0
MOV R8,qword ptr [RSI]
MOV ECX,0xa
LEA RDI,[0x11179b]
MOV RSI,R8
CMPSB.REPE RDI,RSI
SETA DL
SBB DL,0x0
TEST DL,DL
JNZ 0x0010a0a0
MOV RDI,R8
CALL 0x00102510
MOV qword ptr [RBX],0x0
CALL 0x001020a0
MOV dword ptr [RAX],0x3d
MOV EAX,0xffffffff
JMP 0x0010a0a0
(translation_unit "uint FUN_0010a091(uint param_1,undefined8 *param_2)\n\n{\n  int *piVar1;\n  long lVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  bool bVar5;\n  bool bVar6;\n  \n  if (param_1 == 0) {\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    param_1 = 0xffffffff;\n  }\n  else {\n    bVar5 = param_1 < 10;\n    bVar6 = param_1 == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }\n  }\n  return param_1;\n}\n\n" (function_definition "uint FUN_0010a091(uint param_1,undefined8 *param_2)\n\n{\n  int *piVar1;\n  long lVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  bool bVar5;\n  bool bVar6;\n  \n  if (param_1 == 0) {\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    param_1 = 0xffffffff;\n  }\n  else {\n    bVar5 = param_1 < 10;\n    bVar6 = param_1 == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }\n  }\n  return param_1;\n}" type_identifier (function_declarator "FUN_0010a091(uint param_1,undefined8 *param_2)" identifier (parameter_list "(uint param_1,undefined8 *param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "undefined8 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  long lVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  bool bVar5;\n  bool bVar6;\n  \n  if (param_1 == 0) {\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    param_1 = 0xffffffff;\n  }\n  else {\n    bVar5 = param_1 < 10;\n    bVar6 = param_1 == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }\n  }\n  return param_1;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "bool bVar5;" primitive_type identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (if_statement "if (param_1 == 0) {\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    param_1 = 0xffffffff;\n  }\n  else {\n    bVar5 = param_1 < 10;\n    bVar6 = param_1 == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    param_1 = 0xffffffff;\n  }" { (expression_statement "piVar1 = __errno_location();" (assignment_expression "piVar1 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar1 = 0x5f;" (assignment_expression "*piVar1 = 0x5f" (pointer_expression "*piVar1" * identifier) = number_literal) ;) (expression_statement "param_1 = 0xffffffff;" (assignment_expression "param_1 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n    bVar5 = param_1 < 10;\n    bVar6 = param_1 == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }\n  }" else (compound_statement "{\n    bVar5 = param_1 < 10;\n    bVar6 = param_1 == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }\n  }" { (expression_statement "bVar5 = param_1 < 10;" (assignment_expression "bVar5 = param_1 < 10" identifier = (binary_expression "param_1 < 10" identifier < number_literal)) ;) (expression_statement "bVar6 = param_1 == 10;" (assignment_expression "bVar6 = param_1 == 10" identifier = (binary_expression "param_1 == 10" identifier == number_literal)) ;) (if_statement "if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }" if (parenthesized_expression "(bVar6)" ( identifier )) (compound_statement "{\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }" { (expression_statement "lVar2 = 10;" (assignment_expression "lVar2 = 10" identifier = number_literal) ;) (expression_statement "pbVar3 = (byte *)*param_2;" (assignment_expression "pbVar3 = (byte *)*param_2" identifier = (cast_expression "(byte *)*param_2" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "pbVar4 = (byte *)"unlabeled";" (assignment_expression "pbVar4 = (byte *)"unlabeled"" identifier = (cast_expression "(byte *)"unlabeled"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""unlabeled"" " string_content "))) ;) (do_statement "do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);" do (compound_statement "{\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      }" { (if_statement "if (lVar2 == 0) break;" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar2 = lVar2 + -1;" (assignment_expression "lVar2 = lVar2 + -1" identifier = (binary_expression "lVar2 + -1" identifier + number_literal)) ;) (expression_statement "bVar5 = *pbVar3 < *pbVar4;" (assignment_expression "bVar5 = *pbVar3 < *pbVar4" identifier = (binary_expression "*pbVar3 < *pbVar4" (pointer_expression "*pbVar3" * identifier) < (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "bVar6 = *pbVar3 == *pbVar4;" (assignment_expression "bVar6 = *pbVar3 == *pbVar4" identifier = (binary_expression "*pbVar3 == *pbVar4" (pointer_expression "*pbVar3" * identifier) == (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar6)" ( identifier )) ;) (if_statement "if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }" if (parenthesized_expression "((!bVar5 && !bVar6) == bVar5)" ( (binary_expression "(!bVar5 && !bVar6) == bVar5" (parenthesized_expression "(!bVar5 && !bVar6)" ( (binary_expression "!bVar5 && !bVar6" (unary_expression "!bVar5" ! identifier) && (unary_expression "!bVar6" ! identifier)) )) == identifier) )) (compound_statement "{\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }" { (expression_statement "freecon((byte *)*param_2);" (call_expression "freecon((byte *)*param_2)" identifier (argument_list "((byte *)*param_2)" ( (cast_expression "(byte *)*param_2" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier)) ))) ;) (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "piVar1 = __errno_location();" (assignment_expression "piVar1 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar1 = 0x3d;" (assignment_expression "*piVar1 = 0x3d" (pointer_expression "*piVar1" * identifier) = number_literal) ;) (expression_statement "param_1 = 0xffffffff;" (assignment_expression "param_1 = 0xffffffff" identifier = number_literal) ;) })) })) }))) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "int map_to_failure(int ret,security_context_t *con)\n\n{\n  int *piVar1;\n  long lVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  bool bVar5;\n  bool bVar6;\n  \n  if (ret == 0) {\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    ret = -1;\n  }\n  else {\n    bVar5 = (uint)ret < 10;\n    bVar6 = ret == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*con;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        ret = -1;\n      }\n    }\n  }\n  return ret;\n}\n\n" (function_definition "int map_to_failure(int ret,security_context_t *con)\n\n{\n  int *piVar1;\n  long lVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  bool bVar5;\n  bool bVar6;\n  \n  if (ret == 0) {\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    ret = -1;\n  }\n  else {\n    bVar5 = (uint)ret < 10;\n    bVar6 = ret == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*con;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        ret = -1;\n      }\n    }\n  }\n  return ret;\n}" primitive_type (function_declarator "map_to_failure(int ret,security_context_t *con)" identifier (parameter_list "(int ret,security_context_t *con)" ( (parameter_declaration "int ret" primitive_type identifier) , (parameter_declaration "security_context_t *con" type_identifier (pointer_declarator "*con" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  long lVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  bool bVar5;\n  bool bVar6;\n  \n  if (ret == 0) {\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    ret = -1;\n  }\n  else {\n    bVar5 = (uint)ret < 10;\n    bVar6 = ret == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*con;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        ret = -1;\n      }\n    }\n  }\n  return ret;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "bool bVar5;" primitive_type identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (if_statement "if (ret == 0) {\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    ret = -1;\n  }\n  else {\n    bVar5 = (uint)ret < 10;\n    bVar6 = ret == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*con;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        ret = -1;\n      }\n    }\n  }" if (parenthesized_expression "(ret == 0)" ( (binary_expression "ret == 0" identifier == number_literal) )) (compound_statement "{\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    ret = -1;\n  }" { (expression_statement "piVar1 = __errno_location();" (assignment_expression "piVar1 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar1 = 0x5f;" (assignment_expression "*piVar1 = 0x5f" (pointer_expression "*piVar1" * identifier) = number_literal) ;) (expression_statement "ret = -1;" (assignment_expression "ret = -1" identifier = number_literal) ;) }) (else_clause "else {\n    bVar5 = (uint)ret < 10;\n    bVar6 = ret == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*con;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        ret = -1;\n      }\n    }\n  }" else (compound_statement "{\n    bVar5 = (uint)ret < 10;\n    bVar6 = ret == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*con;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        ret = -1;\n      }\n    }\n  }" { (expression_statement "bVar5 = (uint)ret < 10;" (assignment_expression "bVar5 = (uint)ret < 10" identifier = (binary_expression "(uint)ret < 10" (cast_expression "(uint)ret" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal)) ;) (expression_statement "bVar6 = ret == 10;" (assignment_expression "bVar6 = ret == 10" identifier = (binary_expression "ret == 10" identifier == number_literal)) ;) (if_statement "if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*con;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        ret = -1;\n      }\n    }" if (parenthesized_expression "(bVar6)" ( identifier )) (compound_statement "{\n      lVar2 = 10;\n      pbVar3 = (byte *)*con;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        ret = -1;\n      }\n    }" { (expression_statement "lVar2 = 10;" (assignment_expression "lVar2 = 10" identifier = number_literal) ;) (expression_statement "pbVar3 = (byte *)*con;" (assignment_expression "pbVar3 = (byte *)*con" identifier = (cast_expression "(byte *)*con" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*con" * identifier))) ;) (expression_statement "pbVar4 = (byte *)"unlabeled";" (assignment_expression "pbVar4 = (byte *)"unlabeled"" identifier = (cast_expression "(byte *)"unlabeled"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""unlabeled"" " string_content "))) ;) (do_statement "do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);" do (compound_statement "{\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      }" { (if_statement "if (lVar2 == 0) break;" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar2 = lVar2 + -1;" (assignment_expression "lVar2 = lVar2 + -1" identifier = (binary_expression "lVar2 + -1" identifier + number_literal)) ;) (expression_statement "bVar5 = *pbVar3 < *pbVar4;" (assignment_expression "bVar5 = *pbVar3 < *pbVar4" identifier = (binary_expression "*pbVar3 < *pbVar4" (pointer_expression "*pbVar3" * identifier) < (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "bVar6 = *pbVar3 == *pbVar4;" (assignment_expression "bVar6 = *pbVar3 == *pbVar4" identifier = (binary_expression "*pbVar3 == *pbVar4" (pointer_expression "*pbVar3" * identifier) == (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar6)" ( identifier )) ;) (if_statement "if ((!bVar5 && !bVar6) == bVar5) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        ret = -1;\n      }" if (parenthesized_expression "((!bVar5 && !bVar6) == bVar5)" ( (binary_expression "(!bVar5 && !bVar6) == bVar5" (parenthesized_expression "(!bVar5 && !bVar6)" ( (binary_expression "!bVar5 && !bVar6" (unary_expression "!bVar5" ! identifier) && (unary_expression "!bVar6" ! identifier)) )) == identifier) )) (compound_statement "{\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        ret = -1;\n      }" { (expression_statement "freecon(*con);" (call_expression "freecon(*con)" identifier (argument_list "(*con)" ( (pointer_expression "*con" * identifier) ))) ;) (expression_statement "*con = (security_context_t)0x0;" (assignment_expression "*con = (security_context_t)0x0" (pointer_expression "*con" * identifier) = (cast_expression "(security_context_t)0x0" ( (type_descriptor "security_context_t" type_identifier) ) number_literal)) ;) (expression_statement "piVar1 = __errno_location();" (assignment_expression "piVar1 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar1 = 0x3d;" (assignment_expression "*piVar1 = 0x3d" (pointer_expression "*piVar1" * identifier) = number_literal) ;) (expression_statement "ret = -1;" (assignment_expression "ret = -1" identifier = number_literal) ;) })) })) }))) (return_statement "return ret;" return identifier ;) })))
(translation_unit "uint FUN_0010a091(uint param_1,undefined8 *param_2)\n\n{\n  int *piVar1;\n  long lVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  bool bVar5;\n  bool bVar6;\n  \n  if (param_1 == 0) {\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    param_1 = 0xffffffff;\n  }\n  else {\n    bVar5 = param_1 < 10;\n    bVar6 = param_1 == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }\n  }\n  return param_1;\n}\n\n" (function_definition "uint FUN_0010a091(uint param_1,undefined8 *param_2)\n\n{\n  int *piVar1;\n  long lVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  bool bVar5;\n  bool bVar6;\n  \n  if (param_1 == 0) {\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    param_1 = 0xffffffff;\n  }\n  else {\n    bVar5 = param_1 < 10;\n    bVar6 = param_1 == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }\n  }\n  return param_1;\n}" type_identifier (function_declarator "FUN_0010a091(uint param_1,undefined8 *param_2)" identifier (parameter_list "(uint param_1,undefined8 *param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "undefined8 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  long lVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  bool bVar5;\n  bool bVar6;\n  \n  if (param_1 == 0) {\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    param_1 = 0xffffffff;\n  }\n  else {\n    bVar5 = param_1 < 10;\n    bVar6 = param_1 == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }\n  }\n  return param_1;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "bool bVar5;" primitive_type identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (if_statement "if (param_1 == 0) {\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    param_1 = 0xffffffff;\n  }\n  else {\n    bVar5 = param_1 < 10;\n    bVar6 = param_1 == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    param_1 = 0xffffffff;\n  }" { (expression_statement "piVar1 = __errno_location();" (assignment_expression "piVar1 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar1 = 0x5f;" (assignment_expression "*piVar1 = 0x5f" (pointer_expression "*piVar1" * identifier) = number_literal) ;) (expression_statement "param_1 = 0xffffffff;" (assignment_expression "param_1 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n    bVar5 = param_1 < 10;\n    bVar6 = param_1 == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }\n  }" else (compound_statement "{\n    bVar5 = param_1 < 10;\n    bVar6 = param_1 == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }\n  }" { (expression_statement "bVar5 = param_1 < 10;" (assignment_expression "bVar5 = param_1 < 10" identifier = (binary_expression "param_1 < 10" identifier < number_literal)) ;) (expression_statement "bVar6 = param_1 == 10;" (assignment_expression "bVar6 = param_1 == 10" identifier = (binary_expression "param_1 == 10" identifier == number_literal)) ;) (if_statement "if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }" if (parenthesized_expression "(bVar6)" ( identifier )) (compound_statement "{\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }" { (expression_statement "lVar2 = 10;" (assignment_expression "lVar2 = 10" identifier = number_literal) ;) (expression_statement "pbVar3 = (byte *)*param_2;" (assignment_expression "pbVar3 = (byte *)*param_2" identifier = (cast_expression "(byte *)*param_2" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "pbVar4 = (byte *)"unlabeled";" (assignment_expression "pbVar4 = (byte *)"unlabeled"" identifier = (cast_expression "(byte *)"unlabeled"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""unlabeled"" " string_content "))) ;) (do_statement "do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);" do (compound_statement "{\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      }" { (if_statement "if (lVar2 == 0) break;" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar2 = lVar2 + -1;" (assignment_expression "lVar2 = lVar2 + -1" identifier = (binary_expression "lVar2 + -1" identifier + number_literal)) ;) (expression_statement "bVar5 = *pbVar3 < *pbVar4;" (assignment_expression "bVar5 = *pbVar3 < *pbVar4" identifier = (binary_expression "*pbVar3 < *pbVar4" (pointer_expression "*pbVar3" * identifier) < (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "bVar6 = *pbVar3 == *pbVar4;" (assignment_expression "bVar6 = *pbVar3 == *pbVar4" identifier = (binary_expression "*pbVar3 == *pbVar4" (pointer_expression "*pbVar3" * identifier) == (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar6)" ( identifier )) ;) (if_statement "if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }" if (parenthesized_expression "((!bVar5 && !bVar6) == bVar5)" ( (binary_expression "(!bVar5 && !bVar6) == bVar5" (parenthesized_expression "(!bVar5 && !bVar6)" ( (binary_expression "!bVar5 && !bVar6" (unary_expression "!bVar5" ! identifier) && (unary_expression "!bVar6" ! identifier)) )) == identifier) )) (compound_statement "{\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }" { (expression_statement "freecon((byte *)*param_2);" (call_expression "freecon((byte *)*param_2)" identifier (argument_list "((byte *)*param_2)" ( (cast_expression "(byte *)*param_2" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier)) ))) ;) (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "piVar1 = __errno_location();" (assignment_expression "piVar1 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar1 = 0x3d;" (assignment_expression "*piVar1 = 0x3d" (pointer_expression "*piVar1" * identifier) = number_literal) ;) (expression_statement "param_1 = 0xffffffff;" (assignment_expression "param_1 = 0xffffffff" identifier = number_literal) ;) })) })) }))) (return_statement "return param_1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (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 ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT < LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT == LIT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (string_literal " string_content "))) ;) (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 (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) })) }))) (return_statement return IDENT ;) })))
(function_definition "uint FUN_0010a091(uint param_1,undefined8 *param_2)\n\n{\n  int *piVar1;\n  long lVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  bool bVar5;\n  bool bVar6;\n  \n  if (param_1 == 0) {\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    param_1 = 0xffffffff;\n  }\n  else {\n    bVar5 = param_1 < 10;\n    bVar6 = param_1 == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }\n  }\n  return param_1;\n}" (type_identifier "uint") (function_declarator "FUN_0010a091(uint param_1,undefined8 *param_2)" (identifier "FUN_0010a091") (parameter_list "(uint param_1,undefined8 *param_2)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) (, ",") (parameter_declaration "undefined8 *param_2" (type_identifier "undefined8") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int *piVar1;\n  long lVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  bool bVar5;\n  bool bVar6;\n  \n  if (param_1 == 0) {\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    param_1 = 0xffffffff;\n  }\n  else {\n    bVar5 = param_1 < 10;\n    bVar6 = param_1 == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }\n  }\n  return param_1;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (declaration "byte *pbVar3;" (type_identifier "byte") (pointer_declarator "*pbVar3" (* "*") (identifier "pbVar3")) (; ";")) (declaration "byte *pbVar4;" (type_identifier "byte") (pointer_declarator "*pbVar4" (* "*") (identifier "pbVar4")) (; ";")) (declaration "bool bVar5;" (primitive_type "bool") (identifier "bVar5") (; ";")) (declaration "bool bVar6;" (primitive_type "bool") (identifier "bVar6") (; ";")) (if_statement "if (param_1 == 0) {\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    param_1 = 0xffffffff;\n  }\n  else {\n    bVar5 = param_1 < 10;\n    bVar6 = param_1 == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    piVar1 = __errno_location();\n    *piVar1 = 0x5f;\n    param_1 = 0xffffffff;\n  }" ({ "{") (expression_statement "piVar1 = __errno_location();" (assignment_expression "piVar1 = __errno_location()" (identifier "piVar1") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*piVar1 = 0x5f;" (assignment_expression "*piVar1 = 0x5f" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (number_literal "0x5f")) (; ";")) (expression_statement "param_1 = 0xffffffff;" (assignment_expression "param_1 = 0xffffffff" (identifier "param_1") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")) (else_clause "else {\n    bVar5 = param_1 < 10;\n    bVar6 = param_1 == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }\n  }" (else "else") (compound_statement "{\n    bVar5 = param_1 < 10;\n    bVar6 = param_1 == 10;\n    if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }\n  }" ({ "{") (expression_statement "bVar5 = param_1 < 10;" (assignment_expression "bVar5 = param_1 < 10" (identifier "bVar5") (= "=") (binary_expression "param_1 < 10" (identifier "param_1") (< "<") (number_literal "10"))) (; ";")) (expression_statement "bVar6 = param_1 == 10;" (assignment_expression "bVar6 = param_1 == 10" (identifier "bVar6") (= "=") (binary_expression "param_1 == 10" (identifier "param_1") (== "==") (number_literal "10"))) (; ";")) (if_statement "if (bVar6) {\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }" (if "if") (parenthesized_expression "(bVar6)" (( "(") (identifier "bVar6") () ")")) (compound_statement "{\n      lVar2 = 10;\n      pbVar3 = (byte *)*param_2;\n      pbVar4 = (byte *)"unlabeled";\n      do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }\n    }" ({ "{") (expression_statement "lVar2 = 10;" (assignment_expression "lVar2 = 10" (identifier "lVar2") (= "=") (number_literal "10")) (; ";")) (expression_statement "pbVar3 = (byte *)*param_2;" (assignment_expression "pbVar3 = (byte *)*param_2" (identifier "pbVar3") (= "=") (cast_expression "(byte *)*param_2" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (expression_statement "pbVar4 = (byte *)"unlabeled";" (assignment_expression "pbVar4 = (byte *)"unlabeled"" (identifier "pbVar4") (= "=") (cast_expression "(byte *)"unlabeled"" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (string_literal ""unlabeled"" (" """) (string_content "unlabeled") (" """)))) (; ";")) (do_statement "do {\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      } while (bVar6);" (do "do") (compound_statement "{\n        if (lVar2 == 0) break;\n        lVar2 = lVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + 1;\n        pbVar4 = pbVar4 + 1;\n      }" ({ "{") (if_statement "if (lVar2 == 0) break;" (if "if") (parenthesized_expression "(lVar2 == 0)" (( "(") (binary_expression "lVar2 == 0" (identifier "lVar2") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "lVar2 = lVar2 + -1;" (assignment_expression "lVar2 = lVar2 + -1" (identifier "lVar2") (= "=") (binary_expression "lVar2 + -1" (identifier "lVar2") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "bVar5 = *pbVar3 < *pbVar4;" (assignment_expression "bVar5 = *pbVar3 < *pbVar4" (identifier "bVar5") (= "=") (binary_expression "*pbVar3 < *pbVar4" (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")) (< "<") (pointer_expression "*pbVar4" (* "*") (identifier "pbVar4")))) (; ";")) (expression_statement "bVar6 = *pbVar3 == *pbVar4;" (assignment_expression "bVar6 = *pbVar3 == *pbVar4" (identifier "bVar6") (= "=") (binary_expression "*pbVar3 == *pbVar4" (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")) (== "==") (pointer_expression "*pbVar4" (* "*") (identifier "pbVar4")))) (; ";")) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" (identifier "pbVar3") (= "=") (binary_expression "pbVar3 + 1" (identifier "pbVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" (identifier "pbVar4") (= "=") (binary_expression "pbVar4 + 1" (identifier "pbVar4") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar6)" (( "(") (identifier "bVar6") () ")")) (; ";")) (if_statement "if ((!bVar5 && !bVar6) == bVar5) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }" (if "if") (parenthesized_expression "((!bVar5 && !bVar6) == bVar5)" (( "(") (binary_expression "(!bVar5 && !bVar6) == bVar5" (parenthesized_expression "(!bVar5 && !bVar6)" (( "(") (binary_expression "!bVar5 && !bVar6" (unary_expression "!bVar5" (! "!") (identifier "bVar5")) (&& "&&") (unary_expression "!bVar6" (! "!") (identifier "bVar6"))) () ")")) (== "==") (identifier "bVar5")) () ")")) (compound_statement "{\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar1 = __errno_location();\n        *piVar1 = 0x3d;\n        param_1 = 0xffffffff;\n      }" ({ "{") (expression_statement "freecon((byte *)*param_2);" (call_expression "freecon((byte *)*param_2)" (identifier "freecon") (argument_list "((byte *)*param_2)" (( "(") (cast_expression "(byte *)*param_2" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) () ")"))) (; ";")) (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar1 = __errno_location();" (assignment_expression "piVar1 = __errno_location()" (identifier "piVar1") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*piVar1 = 0x3d;" (assignment_expression "*piVar1 = 0x3d" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (number_literal "0x3d")) (; ";")) (expression_statement "param_1 = 0xffffffff;" (assignment_expression "param_1 = 0xffffffff" (identifier "param_1") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}"))) (} "}"))) (} "}")))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

int function_1(int var_1,type_1 *con)

{
  int *piVar1;
  long var_3;
  type_2 *var_4;
  type_2 *var_5;
  bool var_6;
  bool bVar6;
  
  if (var_1 == 0) {
    piVar1 = var_2();
    *piVar1 = 0x5f;
    var_1 = -1;
  }
  else {
    var_6 = (type_3)var_1 < 10;
    bVar6 = var_1 == 10;
    if (bVar6) {
      var_3 = 10;
      var_4 = (type_2 *)*con;
      var_5 = (type_2 *)"unlabeled";
      do {
        if (var_3 == 0) break;
        var_3 = var_3 + -1;
        var_6 = *var_4 < *var_5;
        bVar6 = *var_4 == *var_5;
        var_4 = var_4 + 1;
        var_5 = var_5 + 1;
      } while (bVar6);
      if ((!var_6 && !bVar6) == var_6) {
        var_7(*con);
        *con = (type_1)0x0;
        piVar1 = var_2();
        *piVar1 = 0x3d;
        var_1 = -1;
      }
    }
  }
  return var_1;
}


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

uint MASKED(uint param_1,undefined8 *param_2)

{
  int *piVar1;
  long lVar2;
  byte *pbVar3;
  byte *pbVar4;
  bool bVar5;
  bool bVar6;
  
  if (param_1 == 0) {
    piVar1 = __errno_location();
    *piVar1 = 0x5f;
    param_1 = 0xffffffff;
  }
  else {
    bVar5 = param_1 < 10;
    bVar6 = param_1 == 10;
    if (bVar6) {
      lVar2 = 10;
      pbVar3 = (byte *)*param_2;
      pbVar4 = (byte *)"unlabeled";
      do {
        if (lVar2 == 0) break;
        lVar2 = lVar2 + -1;
        bVar5 = *pbVar3 < *pbVar4;
        bVar6 = *pbVar3 == *pbVar4;
        pbVar3 = pbVar3 + 1;
        pbVar4 = pbVar4 + 1;
      } while (bVar6);
      if ((!bVar5 && !bVar6) == bVar5) {
        freecon((byte *)*param_2);
        *param_2 = 0;
        piVar1 = __errno_location();
        *piVar1 = 0x3d;
        param_1 = 0xffffffff;
      }
    }
  }
  return param_1;
}

