
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int rpl_fgetfilecon(int fd,security_context_t *con)

{
  uint uVar1;
  int *piVar2;
  int iVar3;
  byte *pbVar4;
  byte *pbVar5;
  bool bVar6;
  bool bVar7;
  byte bVar8;
  
  bVar8 = 0;
  uVar1 = fgetfilecon(fd,con);
  if (uVar1 == 0) {
    piVar2 = __errno_location();
    *piVar2 = 0x5f;
    uVar1 = 0xffffffff;
  }
  else {
    bVar6 = uVar1 < 10;
    bVar7 = uVar1 == 10;
    if (bVar7) {
      iVar3 = 10;
      pbVar4 = (byte *)*con;
      pbVar5 = (byte *)"unlabeled";
      do {
        if (iVar3 == 0) break;
        iVar3 = iVar3 + -1;
        bVar6 = *pbVar4 < *pbVar5;
        bVar7 = *pbVar4 == *pbVar5;
        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;
        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;
      } while (bVar7);
      if ((!bVar6 && !bVar7) == bVar6) {
        freecon(*con);
        *con = (security_context_t)0x0;
        piVar2 = __errno_location();
        *piVar2 = 0x3d;
        uVar1 = 0xffffffff;
      }
    }
  }
  return uVar1;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

uint FUN_0002a120(undefined4 param_1,undefined4 *param_2)

{
  uint uVar1;
  int *piVar2;
  int iVar3;
  byte *pbVar4;
  byte *pbVar5;
  bool bVar6;
  bool bVar7;
  byte bVar8;
  
  bVar8 = 0;
  uVar1 = fgetfilecon(param_1,param_2);
  if (uVar1 == 0) {
    piVar2 = __errno_location();
    *piVar2 = 0x5f;
    uVar1 = 0xffffffff;
  }
  else {
    bVar6 = uVar1 < 10;
    bVar7 = uVar1 == 10;
    if (bVar7) {
      iVar3 = 10;
      pbVar4 = (byte *)*param_2;
      pbVar5 = (byte *)"unlabeled";
      do {
        if (iVar3 == 0) break;
        iVar3 = iVar3 + -1;
        bVar6 = *pbVar4 < *pbVar5;
        bVar7 = *pbVar4 == *pbVar5;
        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;
        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;
      } while (bVar7);
      if ((!bVar6 && !bVar7) == bVar6) {
        freecon((byte *)*param_2);
        *param_2 = 0;
        piVar2 = __errno_location();
        *piVar2 = 0x3d;
        uVar1 = 0xffffffff;
      }
    }
  }
  return uVar1;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00012c30
ADD EBX,0xeed7
SUB ESP,0x14
MOV EBP,dword ptr [ESP + 0x2c]
PUSH EBP
PUSH dword ptr [ESP + 0x2c]
CALL 0x000121a0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0002a1a0
CMP EAX,0xa
JZ 0x0002a158
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDX,dword ptr [EBP]
MOV ECX,0xa
LEA EDI,[EBX + 0xffff70a0]
MOV ESI,EDX
CMPSB.REPE ES:EDI,ESI
SETA CL
SBB CL,0x0
TEST CL,CL
JNZ 0x0002a14c
SUB ESP,0xc
PUSH EDX
CALL 0x000125a0
MOV dword ptr [EBP],0x0
CALL 0x000124b0
ADD ESP,0x10
MOV dword ptr [EAX],0x3d
MOV EAX,0xffffffff
JMP 0x0002a14c
CALL 0x000124b0
MOV dword ptr [EAX],0x5f
MOV EAX,0xffffffff
JMP 0x0002a14c
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint FUN_0002a120(undefined4 param_1,undefined4 *param_2)\n\n{\n  uint uVar1;\n  int *piVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  byte bVar8;\n  \n  bVar8 = 0;\n  uVar1 = fgetfilecon(param_1,param_2);\n  if (uVar1 == 0) {\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }\n  else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }\n  return uVar1;\n}\n\n" comment (function_definition "uint FUN_0002a120(undefined4 param_1,undefined4 *param_2)\n\n{\n  uint uVar1;\n  int *piVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  byte bVar8;\n  \n  bVar8 = 0;\n  uVar1 = fgetfilecon(param_1,param_2);\n  if (uVar1 == 0) {\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }\n  else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_0002a120(undefined4 param_1,undefined4 *param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  int *piVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  byte bVar8;\n  \n  bVar8 = 0;\n  uVar1 = fgetfilecon(param_1,param_2);\n  if (uVar1 == 0) {\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }\n  else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (declaration "byte bVar8;" type_identifier identifier ;) (expression_statement "bVar8 = 0;" (assignment_expression "bVar8 = 0" identifier = number_literal) ;) (expression_statement "uVar1 = fgetfilecon(param_1,param_2);" (assignment_expression "uVar1 = fgetfilecon(param_1,param_2)" identifier = (call_expression "fgetfilecon(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (if_statement "if (uVar1 == 0) {\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }\n  else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }" if (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }" { (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar2 = 0x5f;" (assignment_expression "*piVar2 = 0x5f" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }" else (compound_statement "{\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }" { (expression_statement "bVar6 = uVar1 < 10;" (assignment_expression "bVar6 = uVar1 < 10" identifier = (binary_expression "uVar1 < 10" identifier < number_literal)) ;) (expression_statement "bVar7 = uVar1 == 10;" (assignment_expression "bVar7 = uVar1 == 10" identifier = (binary_expression "uVar1 == 10" identifier == number_literal)) ;) (if_statement "if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }" if (parenthesized_expression "(bVar7)" ( identifier )) (compound_statement "{\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }" { (expression_statement "iVar3 = 10;" (assignment_expression "iVar3 = 10" identifier = number_literal) ;) (expression_statement "pbVar4 = (byte *)*param_2;" (assignment_expression "pbVar4 = (byte *)*param_2" identifier = (cast_expression "(byte *)*param_2" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "pbVar5 = (byte *)"unlabeled";" (assignment_expression "pbVar5 = (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 (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);" do (compound_statement "{\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      }" { (if_statement "if (iVar3 == 0) break;" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) (expression_statement "bVar6 = *pbVar4 < *pbVar5;" (assignment_expression "bVar6 = *pbVar4 < *pbVar5" identifier = (binary_expression "*pbVar4 < *pbVar5" (pointer_expression "*pbVar4" * identifier) < (pointer_expression "*pbVar5" * identifier))) ;) (expression_statement "bVar7 = *pbVar4 == *pbVar5;" (assignment_expression "bVar7 = *pbVar4 == *pbVar5" identifier = (binary_expression "*pbVar4 == *pbVar5" (pointer_expression "*pbVar4" * identifier) == (pointer_expression "*pbVar5" * identifier))) ;) (expression_statement "pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;" (assignment_expression "pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1" identifier = (binary_expression "pbVar4 + (uint)bVar8 * -2 + 1" (binary_expression "pbVar4 + (uint)bVar8 * -2" identifier + (binary_expression "(uint)bVar8 * -2" (cast_expression "(uint)bVar8" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;" (assignment_expression "pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1" identifier = (binary_expression "pbVar5 + (uint)bVar8 * -2 + 1" (binary_expression "pbVar5 + (uint)bVar8 * -2" identifier + (binary_expression "(uint)bVar8 * -2" (cast_expression "(uint)bVar8" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(bVar7)" ( identifier )) ;) (if_statement "if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }" if (parenthesized_expression "((!bVar6 && !bVar7) == bVar6)" ( (binary_expression "(!bVar6 && !bVar7) == bVar6" (parenthesized_expression "(!bVar6 && !bVar7)" ( (binary_expression "!bVar6 && !bVar7" (unary_expression "!bVar6" ! identifier) && (unary_expression "!bVar7" ! identifier)) )) == identifier) )) (compound_statement "{\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 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 "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar2 = 0x3d;" (assignment_expression "*piVar2 = 0x3d" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) })) })) }))) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint rpl_fgetfilecon(int fd,security_context_t *con)\n\n{\n  uint uVar1;\n  int *piVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  byte bVar8;\n  \n  bVar8 = 0;\n  uVar1 = fgetfilecon(fd,con);\n  if (uVar1 == 0) {\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }\n  else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*con;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }\n  return uVar1;\n}\n\n" comment comment (function_definition "int rpl_fgetfilecon(int fd,security_context_t *con)\n\n{\n  uint uVar1;\n  int *piVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  byte bVar8;\n  \n  bVar8 = 0;\n  uVar1 = fgetfilecon(fd,con);\n  if (uVar1 == 0) {\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }\n  else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*con;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }\n  return uVar1;\n}" primitive_type (function_declarator "rpl_fgetfilecon(int fd,security_context_t *con)" identifier (parameter_list "(int fd,security_context_t *con)" ( (parameter_declaration "int fd" primitive_type identifier) , (parameter_declaration "security_context_t *con" type_identifier (pointer_declarator "*con" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  int *piVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  byte bVar8;\n  \n  bVar8 = 0;\n  uVar1 = fgetfilecon(fd,con);\n  if (uVar1 == 0) {\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }\n  else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*con;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (declaration "byte bVar8;" type_identifier identifier ;) (expression_statement "bVar8 = 0;" (assignment_expression "bVar8 = 0" identifier = number_literal) ;) (expression_statement "uVar1 = fgetfilecon(fd,con);" (assignment_expression "uVar1 = fgetfilecon(fd,con)" identifier = (call_expression "fgetfilecon(fd,con)" identifier (argument_list "(fd,con)" ( identifier , identifier )))) ;) (if_statement "if (uVar1 == 0) {\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }\n  else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*con;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }" if (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }" { (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar2 = 0x5f;" (assignment_expression "*piVar2 = 0x5f" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*con;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }" else (compound_statement "{\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*con;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }" { (expression_statement "bVar6 = uVar1 < 10;" (assignment_expression "bVar6 = uVar1 < 10" identifier = (binary_expression "uVar1 < 10" identifier < number_literal)) ;) (expression_statement "bVar7 = uVar1 == 10;" (assignment_expression "bVar7 = uVar1 == 10" identifier = (binary_expression "uVar1 == 10" identifier == number_literal)) ;) (if_statement "if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*con;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }" if (parenthesized_expression "(bVar7)" ( identifier )) (compound_statement "{\n      iVar3 = 10;\n      pbVar4 = (byte *)*con;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }" { (expression_statement "iVar3 = 10;" (assignment_expression "iVar3 = 10" identifier = number_literal) ;) (expression_statement "pbVar4 = (byte *)*con;" (assignment_expression "pbVar4 = (byte *)*con" identifier = (cast_expression "(byte *)*con" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*con" * identifier))) ;) (expression_statement "pbVar5 = (byte *)"unlabeled";" (assignment_expression "pbVar5 = (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 (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);" do (compound_statement "{\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      }" { (if_statement "if (iVar3 == 0) break;" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) (expression_statement "bVar6 = *pbVar4 < *pbVar5;" (assignment_expression "bVar6 = *pbVar4 < *pbVar5" identifier = (binary_expression "*pbVar4 < *pbVar5" (pointer_expression "*pbVar4" * identifier) < (pointer_expression "*pbVar5" * identifier))) ;) (expression_statement "bVar7 = *pbVar4 == *pbVar5;" (assignment_expression "bVar7 = *pbVar4 == *pbVar5" identifier = (binary_expression "*pbVar4 == *pbVar5" (pointer_expression "*pbVar4" * identifier) == (pointer_expression "*pbVar5" * identifier))) ;) (expression_statement "pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;" (assignment_expression "pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1" identifier = (binary_expression "pbVar4 + (uint)bVar8 * -2 + 1" (binary_expression "pbVar4 + (uint)bVar8 * -2" identifier + (binary_expression "(uint)bVar8 * -2" (cast_expression "(uint)bVar8" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;" (assignment_expression "pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1" identifier = (binary_expression "pbVar5 + (uint)bVar8 * -2 + 1" (binary_expression "pbVar5 + (uint)bVar8 * -2" identifier + (binary_expression "(uint)bVar8 * -2" (cast_expression "(uint)bVar8" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(bVar7)" ( identifier )) ;) (if_statement "if ((!bVar6 && !bVar7) == bVar6) {\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }" if (parenthesized_expression "((!bVar6 && !bVar7) == bVar6)" ( (binary_expression "(!bVar6 && !bVar7) == bVar6" (parenthesized_expression "(!bVar6 && !bVar7)" ( (binary_expression "!bVar6 && !bVar7" (unary_expression "!bVar6" ! identifier) && (unary_expression "!bVar7" ! identifier)) )) == identifier) )) (compound_statement "{\n        freecon(*con);\n        *con = (security_context_t)0x0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\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 "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar2 = 0x3d;" (assignment_expression "*piVar2 = 0x3d" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) })) })) }))) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "uint FUN_0002a120(undefined4 param_1,undefined4 *param_2)\n\n{\n  uint uVar1;\n  int *piVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  byte bVar8;\n  \n  bVar8 = 0;\n  uVar1 = fgetfilecon(param_1,param_2);\n  if (uVar1 == 0) {\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }\n  else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }\n  return uVar1;\n}\n\n" (function_definition "uint FUN_0002a120(undefined4 param_1,undefined4 *param_2)\n\n{\n  uint uVar1;\n  int *piVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  byte bVar8;\n  \n  bVar8 = 0;\n  uVar1 = fgetfilecon(param_1,param_2);\n  if (uVar1 == 0) {\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }\n  else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_0002a120(undefined4 param_1,undefined4 *param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  int *piVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  byte bVar8;\n  \n  bVar8 = 0;\n  uVar1 = fgetfilecon(param_1,param_2);\n  if (uVar1 == 0) {\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }\n  else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (declaration "byte bVar8;" type_identifier identifier ;) (expression_statement "bVar8 = 0;" (assignment_expression "bVar8 = 0" identifier = number_literal) ;) (expression_statement "uVar1 = fgetfilecon(param_1,param_2);" (assignment_expression "uVar1 = fgetfilecon(param_1,param_2)" identifier = (call_expression "fgetfilecon(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (if_statement "if (uVar1 == 0) {\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }\n  else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }" if (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }" { (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar2 = 0x5f;" (assignment_expression "*piVar2 = 0x5f" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }" else (compound_statement "{\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }" { (expression_statement "bVar6 = uVar1 < 10;" (assignment_expression "bVar6 = uVar1 < 10" identifier = (binary_expression "uVar1 < 10" identifier < number_literal)) ;) (expression_statement "bVar7 = uVar1 == 10;" (assignment_expression "bVar7 = uVar1 == 10" identifier = (binary_expression "uVar1 == 10" identifier == number_literal)) ;) (if_statement "if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }" if (parenthesized_expression "(bVar7)" ( identifier )) (compound_statement "{\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }" { (expression_statement "iVar3 = 10;" (assignment_expression "iVar3 = 10" identifier = number_literal) ;) (expression_statement "pbVar4 = (byte *)*param_2;" (assignment_expression "pbVar4 = (byte *)*param_2" identifier = (cast_expression "(byte *)*param_2" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "pbVar5 = (byte *)"unlabeled";" (assignment_expression "pbVar5 = (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 (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);" do (compound_statement "{\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      }" { (if_statement "if (iVar3 == 0) break;" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) (expression_statement "bVar6 = *pbVar4 < *pbVar5;" (assignment_expression "bVar6 = *pbVar4 < *pbVar5" identifier = (binary_expression "*pbVar4 < *pbVar5" (pointer_expression "*pbVar4" * identifier) < (pointer_expression "*pbVar5" * identifier))) ;) (expression_statement "bVar7 = *pbVar4 == *pbVar5;" (assignment_expression "bVar7 = *pbVar4 == *pbVar5" identifier = (binary_expression "*pbVar4 == *pbVar5" (pointer_expression "*pbVar4" * identifier) == (pointer_expression "*pbVar5" * identifier))) ;) (expression_statement "pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;" (assignment_expression "pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1" identifier = (binary_expression "pbVar4 + (uint)bVar8 * -2 + 1" (binary_expression "pbVar4 + (uint)bVar8 * -2" identifier + (binary_expression "(uint)bVar8 * -2" (cast_expression "(uint)bVar8" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;" (assignment_expression "pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1" identifier = (binary_expression "pbVar5 + (uint)bVar8 * -2 + 1" (binary_expression "pbVar5 + (uint)bVar8 * -2" identifier + (binary_expression "(uint)bVar8 * -2" (cast_expression "(uint)bVar8" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(bVar7)" ( identifier )) ;) (if_statement "if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }" if (parenthesized_expression "((!bVar6 && !bVar7) == bVar6)" ( (binary_expression "(!bVar6 && !bVar7) == bVar6" (parenthesized_expression "(!bVar6 && !bVar7)" ( (binary_expression "!bVar6 && !bVar7" (unary_expression "!bVar6" ! identifier) && (unary_expression "!bVar7" ! identifier)) )) == identifier) )) (compound_statement "{\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 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 "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar2 = 0x3d;" (assignment_expression "*piVar2 = 0x3d" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) })) })) }))) (return_statement "return uVar1;" 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 IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , 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 (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + 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_0002a120(undefined4 param_1,undefined4 *param_2)\n\n{\n  uint uVar1;\n  int *piVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  byte bVar8;\n  \n  bVar8 = 0;\n  uVar1 = fgetfilecon(param_1,param_2);\n  if (uVar1 == 0) {\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }\n  else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }\n  return uVar1;\n}" (type_identifier "uint") (function_declarator "FUN_0002a120(undefined4 param_1,undefined4 *param_2)" (identifier "FUN_0002a120") (parameter_list "(undefined4 param_1,undefined4 *param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  int *piVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  bool bVar6;\n  bool bVar7;\n  byte bVar8;\n  \n  bVar8 = 0;\n  uVar1 = fgetfilecon(param_1,param_2);\n  if (uVar1 == 0) {\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }\n  else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }\n  return uVar1;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "byte *pbVar4;" (type_identifier "byte") (pointer_declarator "*pbVar4" (* "*") (identifier "pbVar4")) (; ";")) (declaration "byte *pbVar5;" (type_identifier "byte") (pointer_declarator "*pbVar5" (* "*") (identifier "pbVar5")) (; ";")) (declaration "bool bVar6;" (primitive_type "bool") (identifier "bVar6") (; ";")) (declaration "bool bVar7;" (primitive_type "bool") (identifier "bVar7") (; ";")) (declaration "byte bVar8;" (type_identifier "byte") (identifier "bVar8") (; ";")) (expression_statement "bVar8 = 0;" (assignment_expression "bVar8 = 0" (identifier "bVar8") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar1 = fgetfilecon(param_1,param_2);" (assignment_expression "uVar1 = fgetfilecon(param_1,param_2)" (identifier "uVar1") (= "=") (call_expression "fgetfilecon(param_1,param_2)" (identifier "fgetfilecon") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (uVar1 == 0) {\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }\n  else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(uVar1 == 0)" (( "(") (binary_expression "uVar1 == 0" (identifier "uVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    piVar2 = __errno_location();\n    *piVar2 = 0x5f;\n    uVar1 = 0xffffffff;\n  }" ({ "{") (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" (identifier "piVar2") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*piVar2 = 0x5f;" (assignment_expression "*piVar2 = 0x5f" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (number_literal "0x5f")) (; ";")) (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" (identifier "uVar1") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")) (else_clause "else {\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }" (else "else") (compound_statement "{\n    bVar6 = uVar1 < 10;\n    bVar7 = uVar1 == 10;\n    if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }\n  }" ({ "{") (expression_statement "bVar6 = uVar1 < 10;" (assignment_expression "bVar6 = uVar1 < 10" (identifier "bVar6") (= "=") (binary_expression "uVar1 < 10" (identifier "uVar1") (< "<") (number_literal "10"))) (; ";")) (expression_statement "bVar7 = uVar1 == 10;" (assignment_expression "bVar7 = uVar1 == 10" (identifier "bVar7") (= "=") (binary_expression "uVar1 == 10" (identifier "uVar1") (== "==") (number_literal "10"))) (; ";")) (if_statement "if (bVar7) {\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }" (if "if") (parenthesized_expression "(bVar7)" (( "(") (identifier "bVar7") () ")")) (compound_statement "{\n      iVar3 = 10;\n      pbVar4 = (byte *)*param_2;\n      pbVar5 = (byte *)"unlabeled";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }\n    }" ({ "{") (expression_statement "iVar3 = 10;" (assignment_expression "iVar3 = 10" (identifier "iVar3") (= "=") (number_literal "10")) (; ";")) (expression_statement "pbVar4 = (byte *)*param_2;" (assignment_expression "pbVar4 = (byte *)*param_2" (identifier "pbVar4") (= "=") (cast_expression "(byte *)*param_2" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (expression_statement "pbVar5 = (byte *)"unlabeled";" (assignment_expression "pbVar5 = (byte *)"unlabeled"" (identifier "pbVar5") (= "=") (cast_expression "(byte *)"unlabeled"" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (string_literal ""unlabeled"" (" """) (string_content "unlabeled") (" """)))) (; ";")) (do_statement "do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);" (do "do") (compound_statement "{\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      }" ({ "{") (if_statement "if (iVar3 == 0) break;" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + -1" (identifier "iVar3") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "bVar6 = *pbVar4 < *pbVar5;" (assignment_expression "bVar6 = *pbVar4 < *pbVar5" (identifier "bVar6") (= "=") (binary_expression "*pbVar4 < *pbVar5" (pointer_expression "*pbVar4" (* "*") (identifier "pbVar4")) (< "<") (pointer_expression "*pbVar5" (* "*") (identifier "pbVar5")))) (; ";")) (expression_statement "bVar7 = *pbVar4 == *pbVar5;" (assignment_expression "bVar7 = *pbVar4 == *pbVar5" (identifier "bVar7") (= "=") (binary_expression "*pbVar4 == *pbVar5" (pointer_expression "*pbVar4" (* "*") (identifier "pbVar4")) (== "==") (pointer_expression "*pbVar5" (* "*") (identifier "pbVar5")))) (; ";")) (expression_statement "pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;" (assignment_expression "pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1" (identifier "pbVar4") (= "=") (binary_expression "pbVar4 + (uint)bVar8 * -2 + 1" (binary_expression "pbVar4 + (uint)bVar8 * -2" (identifier "pbVar4") (+ "+") (binary_expression "(uint)bVar8 * -2" (cast_expression "(uint)bVar8" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar8")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;" (assignment_expression "pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1" (identifier "pbVar5") (= "=") (binary_expression "pbVar5 + (uint)bVar8 * -2 + 1" (binary_expression "pbVar5 + (uint)bVar8 * -2" (identifier "pbVar5") (+ "+") (binary_expression "(uint)bVar8 * -2" (cast_expression "(uint)bVar8" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar8")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar7)" (( "(") (identifier "bVar7") () ")")) (; ";")) (if_statement "if ((!bVar6 && !bVar7) == bVar6) {\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 0xffffffff;\n      }" (if "if") (parenthesized_expression "((!bVar6 && !bVar7) == bVar6)" (( "(") (binary_expression "(!bVar6 && !bVar7) == bVar6" (parenthesized_expression "(!bVar6 && !bVar7)" (( "(") (binary_expression "!bVar6 && !bVar7" (unary_expression "!bVar6" (! "!") (identifier "bVar6")) (&& "&&") (unary_expression "!bVar7" (! "!") (identifier "bVar7"))) () ")")) (== "==") (identifier "bVar6")) () ")")) (compound_statement "{\n        freecon((byte *)*param_2);\n        *param_2 = 0;\n        piVar2 = __errno_location();\n        *piVar2 = 0x3d;\n        uVar1 = 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 "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" (identifier "piVar2") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*piVar2 = 0x3d;" (assignment_expression "*piVar2 = 0x3d" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (number_literal "0x3d")) (; ";")) (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" (identifier "uVar1") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}"))) (} "}"))) (} "}")))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int function_1(int fd,type_1 *con)

{
  type_2 var_2;
  int *piVar2;
  int var_4;
  type_3 *var_5;
  type_3 *var_6;
  bool var_7;
  bool bVar7;
  type_3 bVar8;
  
  bVar8 = 0;
  var_2 = var_1(fd,con);
  if (var_2 == 0) {
    piVar2 = var_3();
    *piVar2 = 0x5f;
    var_2 = 0xffffffff;
  }
  else {
    var_7 = var_2 < 10;
    bVar7 = var_2 == 10;
    if (bVar7) {
      var_4 = 10;
      var_5 = (type_3 *)*con;
      var_6 = (type_3 *)"unlabeled";
      do {
        if (var_4 == 0) break;
        var_4 = var_4 + -1;
        var_7 = *var_5 < *var_6;
        bVar7 = *var_5 == *var_6;
        var_5 = var_5 + (type_2)bVar8 * -2 + 1;
        var_6 = var_6 + (type_2)bVar8 * -2 + 1;
      } while (bVar7);
      if ((!var_7 && !bVar7) == var_7) {
        var_8(*con);
        *con = (type_1)0x0;
        piVar2 = var_3();
        *piVar2 = 0x3d;
        var_2 = 0xffffffff;
      }
    }
  }
  return var_2;
}


(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: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) 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)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (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: (binary_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal))) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal))) 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)))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

uint MASKED(undefined4 param_1,undefined4 *param_2)

{
  uint uVar1;
  int *piVar2;
  int iVar3;
  byte *pbVar4;
  byte *pbVar5;
  bool bVar6;
  bool bVar7;
  byte bVar8;
  
  bVar8 = 0;
  uVar1 = fgetfilecon(param_1,param_2);
  if (uVar1 == 0) {
    piVar2 = __errno_location();
    *piVar2 = 0x5f;
    uVar1 = 0xffffffff;
  }
  else {
    bVar6 = uVar1 < 10;
    bVar7 = uVar1 == 10;
    if (bVar7) {
      iVar3 = 10;
      pbVar4 = (byte *)*param_2;
      pbVar5 = (byte *)"unlabeled";
      do {
        if (iVar3 == 0) break;
        iVar3 = iVar3 + -1;
        bVar6 = *pbVar4 < *pbVar5;
        bVar7 = *pbVar4 == *pbVar5;
        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;
        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;
      } while (bVar7);
      if ((!bVar6 && !bVar7) == bVar6) {
        freecon((byte *)*param_2);
        *param_2 = 0;
        piVar2 = __errno_location();
        *piVar2 = 0x3d;
        uVar1 = 0xffffffff;
      }
    }
  }
  return uVar1;
}

