
size_t freadahead(FILE *fp)

{
  uint uVar1;
  
  if (fp->_IO_write_ptr <= fp->_IO_write_base) {
    uVar1 = fp->_flags & 0x100;
    if (uVar1 != 0) {
      uVar1 = (int)fp->_IO_save_end - (int)fp->_IO_save_base;
    }
    return (size_t)(fp->_IO_read_end + (uVar1 - (int)fp->_IO_read_ptr));
  }
  return 0;
}



int freadahead(uint *param_1)

{
  uint uVar1;
  
  if (param_1[5] <= param_1[4]) {
    uVar1 = *param_1 & 0x100;
    if (uVar1 != 0) {
      uVar1 = param_1[0xb] - param_1[9];
    }
    return (param_1[2] - param_1[1]) + uVar1;
  }
  return 0;
}


lw v0,0x14(a0)
lw v1,0x10(a0)
sltu v0,v1,v0
bne v0,zero,0x0002b234
_nop
lw v0,0x8(a0)
lw v1,0x4(a0)
subu v0,v0,v1
lw v1,0x0(a0)
andi v1,v1,0x100
beq v1,zero,0x0002b22c
_nop
lw v1,0x2c(a0)
lw a0,0x24(a0)
subu v1,v1,a0
jr ra
_addu v0,v0,v1
jr ra
_or v0,zero,zero
(translation_unit "int freadahead(uint *param_1)\n\n{\n  uint uVar1;\n  \n  if (param_1[5] <= param_1[4]) {\n    uVar1 = *param_1 & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = param_1[0xb] - param_1[9];\n    }\n    return (param_1[2] - param_1[1]) + uVar1;\n  }\n  return 0;\n}\n\n" (function_definition "int freadahead(uint *param_1)\n\n{\n  uint uVar1;\n  \n  if (param_1[5] <= param_1[4]) {\n    uVar1 = *param_1 & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = param_1[0xb] - param_1[9];\n    }\n    return (param_1[2] - param_1[1]) + uVar1;\n  }\n  return 0;\n}" primitive_type (function_declarator "freadahead(uint *param_1)" identifier (parameter_list "(uint *param_1)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  \n  if (param_1[5] <= param_1[4]) {\n    uVar1 = *param_1 & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = param_1[0xb] - param_1[9];\n    }\n    return (param_1[2] - param_1[1]) + uVar1;\n  }\n  return 0;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (if_statement "if (param_1[5] <= param_1[4]) {\n    uVar1 = *param_1 & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = param_1[0xb] - param_1[9];\n    }\n    return (param_1[2] - param_1[1]) + uVar1;\n  }" if (parenthesized_expression "(param_1[5] <= param_1[4])" ( (binary_expression "param_1[5] <= param_1[4]" (subscript_expression "param_1[5]" identifier [ number_literal ]) <= (subscript_expression "param_1[4]" identifier [ number_literal ])) )) (compound_statement "{\n    uVar1 = *param_1 & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = param_1[0xb] - param_1[9];\n    }\n    return (param_1[2] - param_1[1]) + uVar1;\n  }" { (expression_statement "uVar1 = *param_1 & 0x100;" (assignment_expression "uVar1 = *param_1 & 0x100" identifier = (binary_expression "*param_1 & 0x100" (pointer_expression "*param_1" * identifier) & number_literal)) ;) (if_statement "if (uVar1 != 0) {\n      uVar1 = param_1[0xb] - param_1[9];\n    }" if (parenthesized_expression "(uVar1 != 0)" ( (binary_expression "uVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar1 = param_1[0xb] - param_1[9];\n    }" { (expression_statement "uVar1 = param_1[0xb] - param_1[9];" (assignment_expression "uVar1 = param_1[0xb] - param_1[9]" identifier = (binary_expression "param_1[0xb] - param_1[9]" (subscript_expression "param_1[0xb]" identifier [ number_literal ]) - (subscript_expression "param_1[9]" identifier [ number_literal ]))) ;) })) (return_statement "return (param_1[2] - param_1[1]) + uVar1;" return (binary_expression "(param_1[2] - param_1[1]) + uVar1" (parenthesized_expression "(param_1[2] - param_1[1])" ( (binary_expression "param_1[2] - param_1[1]" (subscript_expression "param_1[2]" identifier [ number_literal ]) - (subscript_expression "param_1[1]" identifier [ number_literal ])) )) + identifier) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "size_t freadahead(FILE *fp)\n\n{\n  uint uVar1;\n  \n  if (fp->_IO_write_ptr <= fp->_IO_write_base) {\n    uVar1 = fp->_flags & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = (int)fp->_IO_save_end - (int)fp->_IO_save_base;\n    }\n    return (size_t)(fp->_IO_read_end + (uVar1 - (int)fp->_IO_read_ptr));\n  }\n  return 0;\n}\n\n" (function_definition "size_t freadahead(FILE *fp)\n\n{\n  uint uVar1;\n  \n  if (fp->_IO_write_ptr <= fp->_IO_write_base) {\n    uVar1 = fp->_flags & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = (int)fp->_IO_save_end - (int)fp->_IO_save_base;\n    }\n    return (size_t)(fp->_IO_read_end + (uVar1 - (int)fp->_IO_read_ptr));\n  }\n  return 0;\n}" primitive_type (function_declarator "freadahead(FILE *fp)" identifier (parameter_list "(FILE *fp)" ( (parameter_declaration "FILE *fp" type_identifier (pointer_declarator "*fp" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  \n  if (fp->_IO_write_ptr <= fp->_IO_write_base) {\n    uVar1 = fp->_flags & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = (int)fp->_IO_save_end - (int)fp->_IO_save_base;\n    }\n    return (size_t)(fp->_IO_read_end + (uVar1 - (int)fp->_IO_read_ptr));\n  }\n  return 0;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (if_statement "if (fp->_IO_write_ptr <= fp->_IO_write_base) {\n    uVar1 = fp->_flags & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = (int)fp->_IO_save_end - (int)fp->_IO_save_base;\n    }\n    return (size_t)(fp->_IO_read_end + (uVar1 - (int)fp->_IO_read_ptr));\n  }" if (parenthesized_expression "(fp->_IO_write_ptr <= fp->_IO_write_base)" ( (binary_expression "fp->_IO_write_ptr <= fp->_IO_write_base" (field_expression "fp->_IO_write_ptr" identifier -> field_identifier) <= (field_expression "fp->_IO_write_base" identifier -> field_identifier)) )) (compound_statement "{\n    uVar1 = fp->_flags & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = (int)fp->_IO_save_end - (int)fp->_IO_save_base;\n    }\n    return (size_t)(fp->_IO_read_end + (uVar1 - (int)fp->_IO_read_ptr));\n  }" { (expression_statement "uVar1 = fp->_flags & 0x100;" (assignment_expression "uVar1 = fp->_flags & 0x100" identifier = (binary_expression "fp->_flags & 0x100" (field_expression "fp->_flags" identifier -> field_identifier) & number_literal)) ;) (if_statement "if (uVar1 != 0) {\n      uVar1 = (int)fp->_IO_save_end - (int)fp->_IO_save_base;\n    }" if (parenthesized_expression "(uVar1 != 0)" ( (binary_expression "uVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar1 = (int)fp->_IO_save_end - (int)fp->_IO_save_base;\n    }" { (expression_statement "uVar1 = (int)fp->_IO_save_end - (int)fp->_IO_save_base;" (assignment_expression "uVar1 = (int)fp->_IO_save_end - (int)fp->_IO_save_base" identifier = (binary_expression "(int)fp->_IO_save_end - (int)fp->_IO_save_base" (cast_expression "(int)fp->_IO_save_end" ( (type_descriptor "int" primitive_type) ) (field_expression "fp->_IO_save_end" identifier -> field_identifier)) - (cast_expression "(int)fp->_IO_save_base" ( (type_descriptor "int" primitive_type) ) (field_expression "fp->_IO_save_base" identifier -> field_identifier)))) ;) })) (return_statement "return (size_t)(fp->_IO_read_end + (uVar1 - (int)fp->_IO_read_ptr));" return (cast_expression "(size_t)(fp->_IO_read_end + (uVar1 - (int)fp->_IO_read_ptr))" ( (type_descriptor "size_t" primitive_type) ) (parenthesized_expression "(fp->_IO_read_end + (uVar1 - (int)fp->_IO_read_ptr))" ( (binary_expression "fp->_IO_read_end + (uVar1 - (int)fp->_IO_read_ptr)" (field_expression "fp->_IO_read_end" identifier -> field_identifier) + (parenthesized_expression "(uVar1 - (int)fp->_IO_read_ptr)" ( (binary_expression "uVar1 - (int)fp->_IO_read_ptr" identifier - (cast_expression "(int)fp->_IO_read_ptr" ( (type_descriptor "int" primitive_type) ) (field_expression "fp->_IO_read_ptr" identifier -> field_identifier))) ))) ))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int freadahead(uint *param_1)\n\n{\n  uint uVar1;\n  \n  if (param_1[5] <= param_1[4]) {\n    uVar1 = *param_1 & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = param_1[0xb] - param_1[9];\n    }\n    return (param_1[2] - param_1[1]) + uVar1;\n  }\n  return 0;\n}\n\n" (function_definition "int freadahead(uint *param_1)\n\n{\n  uint uVar1;\n  \n  if (param_1[5] <= param_1[4]) {\n    uVar1 = *param_1 & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = param_1[0xb] - param_1[9];\n    }\n    return (param_1[2] - param_1[1]) + uVar1;\n  }\n  return 0;\n}" primitive_type (function_declarator "freadahead(uint *param_1)" identifier (parameter_list "(uint *param_1)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  \n  if (param_1[5] <= param_1[4]) {\n    uVar1 = *param_1 & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = param_1[0xb] - param_1[9];\n    }\n    return (param_1[2] - param_1[1]) + uVar1;\n  }\n  return 0;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (if_statement "if (param_1[5] <= param_1[4]) {\n    uVar1 = *param_1 & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = param_1[0xb] - param_1[9];\n    }\n    return (param_1[2] - param_1[1]) + uVar1;\n  }" if (parenthesized_expression "(param_1[5] <= param_1[4])" ( (binary_expression "param_1[5] <= param_1[4]" (subscript_expression "param_1[5]" identifier [ number_literal ]) <= (subscript_expression "param_1[4]" identifier [ number_literal ])) )) (compound_statement "{\n    uVar1 = *param_1 & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = param_1[0xb] - param_1[9];\n    }\n    return (param_1[2] - param_1[1]) + uVar1;\n  }" { (expression_statement "uVar1 = *param_1 & 0x100;" (assignment_expression "uVar1 = *param_1 & 0x100" identifier = (binary_expression "*param_1 & 0x100" (pointer_expression "*param_1" * identifier) & number_literal)) ;) (if_statement "if (uVar1 != 0) {\n      uVar1 = param_1[0xb] - param_1[9];\n    }" if (parenthesized_expression "(uVar1 != 0)" ( (binary_expression "uVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar1 = param_1[0xb] - param_1[9];\n    }" { (expression_statement "uVar1 = param_1[0xb] - param_1[9];" (assignment_expression "uVar1 = param_1[0xb] - param_1[9]" identifier = (binary_expression "param_1[0xb] - param_1[9]" (subscript_expression "param_1[0xb]" identifier [ number_literal ]) - (subscript_expression "param_1[9]" identifier [ number_literal ]))) ;) })) (return_statement "return (param_1[2] - param_1[1]) + uVar1;" return (binary_expression "(param_1[2] - param_1[1]) + uVar1" (parenthesized_expression "(param_1[2] - param_1[1])" ( (binary_expression "param_1[2] - param_1[1]" (subscript_expression "param_1[2]" identifier [ number_literal ]) - (subscript_expression "param_1[1]" identifier [ number_literal ])) )) + identifier) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) <= (subscript_expression IDENT [ LIT ])) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) - (subscript_expression IDENT [ LIT ]))) ;) })) (return_statement return (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) - (subscript_expression IDENT [ LIT ])) )) + IDENT) ;) })) (return_statement return LIT ;) })))
(function_definition "int freadahead(uint *param_1)\n\n{\n  uint uVar1;\n  \n  if (param_1[5] <= param_1[4]) {\n    uVar1 = *param_1 & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = param_1[0xb] - param_1[9];\n    }\n    return (param_1[2] - param_1[1]) + uVar1;\n  }\n  return 0;\n}" (primitive_type "int") (function_declarator "freadahead(uint *param_1)" (identifier "freadahead") (parameter_list "(uint *param_1)" (( "(") (parameter_declaration "uint *param_1" (type_identifier "uint") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  \n  if (param_1[5] <= param_1[4]) {\n    uVar1 = *param_1 & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = param_1[0xb] - param_1[9];\n    }\n    return (param_1[2] - param_1[1]) + uVar1;\n  }\n  return 0;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (if_statement "if (param_1[5] <= param_1[4]) {\n    uVar1 = *param_1 & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = param_1[0xb] - param_1[9];\n    }\n    return (param_1[2] - param_1[1]) + uVar1;\n  }" (if "if") (parenthesized_expression "(param_1[5] <= param_1[4])" (( "(") (binary_expression "param_1[5] <= param_1[4]" (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]")) (<= "<=") (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]"))) () ")")) (compound_statement "{\n    uVar1 = *param_1 & 0x100;\n    if (uVar1 != 0) {\n      uVar1 = param_1[0xb] - param_1[9];\n    }\n    return (param_1[2] - param_1[1]) + uVar1;\n  }" ({ "{") (expression_statement "uVar1 = *param_1 & 0x100;" (assignment_expression "uVar1 = *param_1 & 0x100" (identifier "uVar1") (= "=") (binary_expression "*param_1 & 0x100" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (& "&") (number_literal "0x100"))) (; ";")) (if_statement "if (uVar1 != 0) {\n      uVar1 = param_1[0xb] - param_1[9];\n    }" (if "if") (parenthesized_expression "(uVar1 != 0)" (( "(") (binary_expression "uVar1 != 0" (identifier "uVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar1 = param_1[0xb] - param_1[9];\n    }" ({ "{") (expression_statement "uVar1 = param_1[0xb] - param_1[9];" (assignment_expression "uVar1 = param_1[0xb] - param_1[9]" (identifier "uVar1") (= "=") (binary_expression "param_1[0xb] - param_1[9]" (subscript_expression "param_1[0xb]" (identifier "param_1") ([ "[") (number_literal "0xb") (] "]")) (- "-") (subscript_expression "param_1[9]" (identifier "param_1") ([ "[") (number_literal "9") (] "]")))) (; ";")) (} "}"))) (return_statement "return (param_1[2] - param_1[1]) + uVar1;" (return "return") (binary_expression "(param_1[2] - param_1[1]) + uVar1" (parenthesized_expression "(param_1[2] - param_1[1])" (( "(") (binary_expression "param_1[2] - param_1[1]" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (- "-") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) () ")")) (+ "+") (identifier "uVar1")) (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

size_t function_1(type_1 *fp)

{
  type_2 var_1;
  
  if (fp->_IO_write_ptr <= fp->_IO_write_base) {
    var_1 = fp->_flags & 0x100;
    if (var_1 != 0) {
      var_1 = (int)fp->_IO_save_end - (int)fp->_IO_save_base;
    }
    return (size_t)(fp->_IO_read_end + (var_1 - (int)fp->_IO_read_ptr));
  }
  return 0;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (subscript_expression argument: (identifier) index: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (subscript_expression argument: (identifier) index: (number_literal))))))) (return_statement (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (subscript_expression argument: (identifier) index: (number_literal)))) right: (identifier))))) (return_statement (number_literal)))))

int MASKED(uint *param_1)

{
  uint uVar1;
  
  if (param_1[5] <= param_1[4]) {
    uVar1 = *param_1 & 0x100;
    if (uVar1 != 0) {
      uVar1 = param_1[0xb] - param_1[9];
    }
    return (param_1[2] - param_1[1]) + uVar1;
  }
  return 0;
}

