
_Bool sg_all_ffs(uint8_t *bp,int b_len)

{
  bool bVar1;
  uint8_t *puVar2;
  
  if ((bp != (uint8_t *)0x0) && (0 < b_len)) {
    puVar2 = bp + b_len + -1;
    do {
      if (*puVar2 != 0xff) {
        return false;
      }
      bVar1 = bp != puVar2;
      puVar2 = puVar2 + -1;
    } while (bVar1);
    return true;
  }
  return false;
}



undefined4 sg_all_ffs(char *param_1,int param_2)

{
  bool bVar1;
  char *pcVar2;
  
  if ((param_1 != (char *)0x0) && (0 < param_2)) {
    pcVar2 = param_1 + param_2 + -1;
    do {
      if (*pcVar2 != -1) {
        return 0;
      }
      bVar1 = param_1 != pcVar2;
      pcVar2 = pcVar2 + -1;
    } while (bVar1);
    return 1;
  }
  return 0;
}


beq a0,zero,0x0001d918
_nop
blez a1,0x0001d918
_addiu a1,a1,-0x1
li a2,0xff
addu a1,a0,a1
lbu v0,0x0(a1)
bne v0,a2,0x0001d920
_addiu v1,a1,-0x1
bne a0,a1,0x0001d8fc
_or a1,v1,zero
jr ra
_li v0,0x1
jr ra
_or v0,zero,zero
jr ra
_or v0,zero,zero
(translation_unit "undefined4 sg_all_ffs(char *param_1,int param_2)\n\n{\n  bool bVar1;\n  char *pcVar2;\n  \n  if ((param_1 != (char *)0x0) && (0 < param_2)) {\n    pcVar2 = param_1 + param_2 + -1;\n    do {\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    } while (bVar1);\n    return 1;\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 sg_all_ffs(char *param_1,int param_2)\n\n{\n  bool bVar1;\n  char *pcVar2;\n  \n  if ((param_1 != (char *)0x0) && (0 < param_2)) {\n    pcVar2 = param_1 + param_2 + -1;\n    do {\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    } while (bVar1);\n    return 1;\n  }\n  return 0;\n}" type_identifier (function_declarator "sg_all_ffs(char *param_1,int param_2)" identifier (parameter_list "(char *param_1,int param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  bool bVar1;\n  char *pcVar2;\n  \n  if ((param_1 != (char *)0x0) && (0 < param_2)) {\n    pcVar2 = param_1 + param_2 + -1;\n    do {\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    } while (bVar1);\n    return 1;\n  }\n  return 0;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (if_statement "if ((param_1 != (char *)0x0) && (0 < param_2)) {\n    pcVar2 = param_1 + param_2 + -1;\n    do {\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    } while (bVar1);\n    return 1;\n  }" if (parenthesized_expression "((param_1 != (char *)0x0) && (0 < param_2))" ( (binary_expression "(param_1 != (char *)0x0) && (0 < param_2)" (parenthesized_expression "(param_1 != (char *)0x0)" ( (binary_expression "param_1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(0 < param_2)" ( (binary_expression "0 < param_2" number_literal < identifier) ))) )) (compound_statement "{\n    pcVar2 = param_1 + param_2 + -1;\n    do {\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    } while (bVar1);\n    return 1;\n  }" { (expression_statement "pcVar2 = param_1 + param_2 + -1;" (assignment_expression "pcVar2 = param_1 + param_2 + -1" identifier = (binary_expression "param_1 + param_2 + -1" (binary_expression "param_1 + param_2" identifier + identifier) + number_literal)) ;) (do_statement "do {\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    } while (bVar1);" do (compound_statement "{\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    }" { (if_statement "if (*pcVar2 != -1) {\n        return 0;\n      }" if (parenthesized_expression "(*pcVar2 != -1)" ( (binary_expression "*pcVar2 != -1" (pointer_expression "*pcVar2" * identifier) != number_literal) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "bVar1 = param_1 != pcVar2;" (assignment_expression "bVar1 = param_1 != pcVar2" identifier = (binary_expression "param_1 != pcVar2" identifier != identifier)) ;) (expression_statement "pcVar2 = pcVar2 + -1;" (assignment_expression "pcVar2 = pcVar2 + -1" identifier = (binary_expression "pcVar2 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar1)" ( identifier )) ;) (return_statement "return 1;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "_Bool sg_all_ffs(uint8_t *bp,int b_len)\n\n{\n  bool bVar1;\n  uint8_t *puVar2;\n  \n  if ((bp != (uint8_t *)0x0) && (0 < b_len)) {\n    puVar2 = bp + b_len + -1;\n    do {\n      if (*puVar2 != 0xff) {\n        return false;\n      }\n      bVar1 = bp != puVar2;\n      puVar2 = puVar2 + -1;\n    } while (bVar1);\n    return true;\n  }\n  return false;\n}\n\n" (function_definition "_Bool sg_all_ffs(uint8_t *bp,int b_len)\n\n{\n  bool bVar1;\n  uint8_t *puVar2;\n  \n  if ((bp != (uint8_t *)0x0) && (0 < b_len)) {\n    puVar2 = bp + b_len + -1;\n    do {\n      if (*puVar2 != 0xff) {\n        return false;\n      }\n      bVar1 = bp != puVar2;\n      puVar2 = puVar2 + -1;\n    } while (bVar1);\n    return true;\n  }\n  return false;\n}" type_identifier (function_declarator "sg_all_ffs(uint8_t *bp,int b_len)" identifier (parameter_list "(uint8_t *bp,int b_len)" ( (parameter_declaration "uint8_t *bp" primitive_type (pointer_declarator "*bp" * identifier)) , (parameter_declaration "int b_len" primitive_type identifier) ))) (compound_statement "{\n  bool bVar1;\n  uint8_t *puVar2;\n  \n  if ((bp != (uint8_t *)0x0) && (0 < b_len)) {\n    puVar2 = bp + b_len + -1;\n    do {\n      if (*puVar2 != 0xff) {\n        return false;\n      }\n      bVar1 = bp != puVar2;\n      puVar2 = puVar2 + -1;\n    } while (bVar1);\n    return true;\n  }\n  return false;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "uint8_t *puVar2;" primitive_type (pointer_declarator "*puVar2" * identifier) ;) (if_statement "if ((bp != (uint8_t *)0x0) && (0 < b_len)) {\n    puVar2 = bp + b_len + -1;\n    do {\n      if (*puVar2 != 0xff) {\n        return false;\n      }\n      bVar1 = bp != puVar2;\n      puVar2 = puVar2 + -1;\n    } while (bVar1);\n    return true;\n  }" if (parenthesized_expression "((bp != (uint8_t *)0x0) && (0 < b_len))" ( (binary_expression "(bp != (uint8_t *)0x0) && (0 < b_len)" (parenthesized_expression "(bp != (uint8_t *)0x0)" ( (binary_expression "bp != (uint8_t *)0x0" identifier != (cast_expression "(uint8_t *)0x0" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(0 < b_len)" ( (binary_expression "0 < b_len" number_literal < identifier) ))) )) (compound_statement "{\n    puVar2 = bp + b_len + -1;\n    do {\n      if (*puVar2 != 0xff) {\n        return false;\n      }\n      bVar1 = bp != puVar2;\n      puVar2 = puVar2 + -1;\n    } while (bVar1);\n    return true;\n  }" { (expression_statement "puVar2 = bp + b_len + -1;" (assignment_expression "puVar2 = bp + b_len + -1" identifier = (binary_expression "bp + b_len + -1" (binary_expression "bp + b_len" identifier + identifier) + number_literal)) ;) (do_statement "do {\n      if (*puVar2 != 0xff) {\n        return false;\n      }\n      bVar1 = bp != puVar2;\n      puVar2 = puVar2 + -1;\n    } while (bVar1);" do (compound_statement "{\n      if (*puVar2 != 0xff) {\n        return false;\n      }\n      bVar1 = bp != puVar2;\n      puVar2 = puVar2 + -1;\n    }" { (if_statement "if (*puVar2 != 0xff) {\n        return false;\n      }" if (parenthesized_expression "(*puVar2 != 0xff)" ( (binary_expression "*puVar2 != 0xff" (pointer_expression "*puVar2" * identifier) != number_literal) )) (compound_statement "{\n        return false;\n      }" { (return_statement "return false;" return false ;) })) (expression_statement "bVar1 = bp != puVar2;" (assignment_expression "bVar1 = bp != puVar2" identifier = (binary_expression "bp != puVar2" identifier != identifier)) ;) (expression_statement "puVar2 = puVar2 + -1;" (assignment_expression "puVar2 = puVar2 + -1" identifier = (binary_expression "puVar2 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar1)" ( identifier )) ;) (return_statement "return true;" return true ;) })) (return_statement "return false;" return false ;) })))
(translation_unit "undefined4 sg_all_ffs(char *param_1,int param_2)\n\n{\n  bool bVar1;\n  char *pcVar2;\n  \n  if ((param_1 != (char *)0x0) && (0 < param_2)) {\n    pcVar2 = param_1 + param_2 + -1;\n    do {\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    } while (bVar1);\n    return 1;\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 sg_all_ffs(char *param_1,int param_2)\n\n{\n  bool bVar1;\n  char *pcVar2;\n  \n  if ((param_1 != (char *)0x0) && (0 < param_2)) {\n    pcVar2 = param_1 + param_2 + -1;\n    do {\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    } while (bVar1);\n    return 1;\n  }\n  return 0;\n}" type_identifier (function_declarator "sg_all_ffs(char *param_1,int param_2)" identifier (parameter_list "(char *param_1,int param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  bool bVar1;\n  char *pcVar2;\n  \n  if ((param_1 != (char *)0x0) && (0 < param_2)) {\n    pcVar2 = param_1 + param_2 + -1;\n    do {\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    } while (bVar1);\n    return 1;\n  }\n  return 0;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (if_statement "if ((param_1 != (char *)0x0) && (0 < param_2)) {\n    pcVar2 = param_1 + param_2 + -1;\n    do {\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    } while (bVar1);\n    return 1;\n  }" if (parenthesized_expression "((param_1 != (char *)0x0) && (0 < param_2))" ( (binary_expression "(param_1 != (char *)0x0) && (0 < param_2)" (parenthesized_expression "(param_1 != (char *)0x0)" ( (binary_expression "param_1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(0 < param_2)" ( (binary_expression "0 < param_2" number_literal < identifier) ))) )) (compound_statement "{\n    pcVar2 = param_1 + param_2 + -1;\n    do {\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    } while (bVar1);\n    return 1;\n  }" { (expression_statement "pcVar2 = param_1 + param_2 + -1;" (assignment_expression "pcVar2 = param_1 + param_2 + -1" identifier = (binary_expression "param_1 + param_2 + -1" (binary_expression "param_1 + param_2" identifier + identifier) + number_literal)) ;) (do_statement "do {\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    } while (bVar1);" do (compound_statement "{\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    }" { (if_statement "if (*pcVar2 != -1) {\n        return 0;\n      }" if (parenthesized_expression "(*pcVar2 != -1)" ( (binary_expression "*pcVar2 != -1" (pointer_expression "*pcVar2" * identifier) != number_literal) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "bVar1 = param_1 != pcVar2;" (assignment_expression "bVar1 = param_1 != pcVar2" identifier = (binary_expression "param_1 != pcVar2" identifier != identifier)) ;) (expression_statement "pcVar2 = pcVar2 + -1;" (assignment_expression "pcVar2 = pcVar2 + -1" identifier = (binary_expression "pcVar2 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar1)" ( identifier )) ;) (return_statement "return 1;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression LIT < IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + IDENT) + LIT)) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT != IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( IDENT )) ;) (return_statement return LIT ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 sg_all_ffs(char *param_1,int param_2)\n\n{\n  bool bVar1;\n  char *pcVar2;\n  \n  if ((param_1 != (char *)0x0) && (0 < param_2)) {\n    pcVar2 = param_1 + param_2 + -1;\n    do {\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    } while (bVar1);\n    return 1;\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "sg_all_ffs(char *param_1,int param_2)" (identifier "sg_all_ffs") (parameter_list "(char *param_1,int param_2)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  bool bVar1;\n  char *pcVar2;\n  \n  if ((param_1 != (char *)0x0) && (0 < param_2)) {\n    pcVar2 = param_1 + param_2 + -1;\n    do {\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    } while (bVar1);\n    return 1;\n  }\n  return 0;\n}" ({ "{") (declaration "bool bVar1;" (primitive_type "bool") (identifier "bVar1") (; ";")) (declaration "char *pcVar2;" (primitive_type "char") (pointer_declarator "*pcVar2" (* "*") (identifier "pcVar2")) (; ";")) (if_statement "if ((param_1 != (char *)0x0) && (0 < param_2)) {\n    pcVar2 = param_1 + param_2 + -1;\n    do {\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    } while (bVar1);\n    return 1;\n  }" (if "if") (parenthesized_expression "((param_1 != (char *)0x0) && (0 < param_2))" (( "(") (binary_expression "(param_1 != (char *)0x0) && (0 < param_2)" (parenthesized_expression "(param_1 != (char *)0x0)" (( "(") (binary_expression "param_1 != (char *)0x0" (identifier "param_1") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(0 < param_2)" (( "(") (binary_expression "0 < param_2" (number_literal "0") (< "<") (identifier "param_2")) () ")"))) () ")")) (compound_statement "{\n    pcVar2 = param_1 + param_2 + -1;\n    do {\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    } while (bVar1);\n    return 1;\n  }" ({ "{") (expression_statement "pcVar2 = param_1 + param_2 + -1;" (assignment_expression "pcVar2 = param_1 + param_2 + -1" (identifier "pcVar2") (= "=") (binary_expression "param_1 + param_2 + -1" (binary_expression "param_1 + param_2" (identifier "param_1") (+ "+") (identifier "param_2")) (+ "+") (number_literal "-1"))) (; ";")) (do_statement "do {\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    } while (bVar1);" (do "do") (compound_statement "{\n      if (*pcVar2 != -1) {\n        return 0;\n      }\n      bVar1 = param_1 != pcVar2;\n      pcVar2 = pcVar2 + -1;\n    }" ({ "{") (if_statement "if (*pcVar2 != -1) {\n        return 0;\n      }" (if "if") (parenthesized_expression "(*pcVar2 != -1)" (( "(") (binary_expression "*pcVar2 != -1" (pointer_expression "*pcVar2" (* "*") (identifier "pcVar2")) (!= "!=") (number_literal "-1")) () ")")) (compound_statement "{\n        return 0;\n      }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "bVar1 = param_1 != pcVar2;" (assignment_expression "bVar1 = param_1 != pcVar2" (identifier "bVar1") (= "=") (binary_expression "param_1 != pcVar2" (identifier "param_1") (!= "!=") (identifier "pcVar2"))) (; ";")) (expression_statement "pcVar2 = pcVar2 + -1;" (assignment_expression "pcVar2 = pcVar2 + -1" (identifier "pcVar2") (= "=") (binary_expression "pcVar2 + -1" (identifier "pcVar2") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar1)" (( "(") (identifier "bVar1") () ")")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) right: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal)))) (do_statement body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (identifier))) (return_statement (number_literal)))) (return_statement (number_literal)))))

undefined4 MASKED(char *param_1,int param_2)

{
  bool bVar1;
  char *pcVar2;
  
  if ((param_1 != (char *)0x0) && (0 < param_2)) {
    pcVar2 = param_1 + param_2 + -1;
    do {
      if (*pcVar2 != -1) {
        return 0;
      }
      bVar1 = param_1 != pcVar2;
      pcVar2 = pcVar2 + -1;
    } while (bVar1);
    return 1;
  }
  return 0;
}

