
/* std::streambuf::sungetc() */

uint __thiscall std::streambuf::sungetc(streambuf *this)

{
  uint uVar1;
  
  uVar1 = *(uint *)(this + 8);
  if (*(uint *)(this + 4) < uVar1) {
    *(uint *)(this + 8) = uVar1 - 1;
    return (uint)*(byte *)(uVar1 - 1);
  }
  if (*(code **)(*(int *)this + 0x2c) == (code *)PTR_pbackfail_00435ee4) {
    return 0xffffffff;
  }
                    /* WARNING: Could not recover jumptable at 0x002c4550. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  uVar1 = (**(code **)(*(int *)this + 0x2c))(this,0xffffffff);
  return uVar1;
}



uint FUN_002c4508(int *param_1)

{
  uint uVar1;
  
  uVar1 = param_1[2];
  if ((uint)param_1[1] < uVar1) {
    param_1[2] = uVar1 - 1;
    return (uint)*(byte *)(uVar1 - 1);
  }
  if (*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4) {
    return 0xffffffff;
  }
                    /* WARNING: Could not recover jumptable at 0x002c4550. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  uVar1 = (**(code **)(*param_1 + 0x2c))(param_1,0xffffffff);
  return uVar1;
}


lui gp,0x17
addiu gp,gp,0x5cc8
addu gp,gp,t9
lw a1,0x8(a0)
lw v1,0x4(a0)
sltu v1,v1,a1
beq v1,zero,0x002c4534
_addiu v1,a1,-0x1
sw v1,0x8(a0)
jr ra
_lbu v0,-0x1(a1)
lw v1,0x0(a0)
lw v0,-0x42ec(gp)
lw t9,0x2c(v1)
bne t9,v0,0x002c4550
_li v0,-0x1
jr ra
_nop
jr t9
_li a1,-0x1
(translation_unit "uint FUN_002c4508(int *param_1)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_1[2];\n  if ((uint)param_1[1] < uVar1) {\n    param_1[2] = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }\n  if (*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4) {\n    return 0xffffffff;\n  }\n                    /* WARNING: Could not recover jumptable at 0x002c4550. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar1 = (**(code **)(*param_1 + 0x2c))(param_1,0xffffffff);\n  return uVar1;\n}\n\n" (function_definition "uint FUN_002c4508(int *param_1)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_1[2];\n  if ((uint)param_1[1] < uVar1) {\n    param_1[2] = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }\n  if (*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4) {\n    return 0xffffffff;\n  }\n                    /* WARNING: Could not recover jumptable at 0x002c4550. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar1 = (**(code **)(*param_1 + 0x2c))(param_1,0xffffffff);\n  return uVar1;\n}" type_identifier (function_declarator "FUN_002c4508(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = param_1[2];\n  if ((uint)param_1[1] < uVar1) {\n    param_1[2] = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }\n  if (*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4) {\n    return 0xffffffff;\n  }\n                    /* WARNING: Could not recover jumptable at 0x002c4550. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar1 = (**(code **)(*param_1 + 0x2c))(param_1,0xffffffff);\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = param_1[2];" (assignment_expression "uVar1 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) (if_statement "if ((uint)param_1[1] < uVar1) {\n    param_1[2] = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }" if (parenthesized_expression "((uint)param_1[1] < uVar1)" ( (binary_expression "(uint)param_1[1] < uVar1" (cast_expression "(uint)param_1[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) < identifier) )) (compound_statement "{\n    param_1[2] = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }" { (expression_statement "param_1[2] = uVar1 - 1;" (assignment_expression "param_1[2] = uVar1 - 1" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (binary_expression "uVar1 - 1" identifier - number_literal)) ;) (return_statement "return (uint)*(byte *)(uVar1 - 1);" return (binary_expression "(uint)*(byte *)(uVar1 - 1)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(uVar1 - 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar1 - 1)" ( (binary_expression "uVar1 - 1" identifier - number_literal) )))) ;) })) (if_statement "if (*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4) {\n    return 0xffffffff;\n  }" if (parenthesized_expression "(*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4)" ( (binary_expression "*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4" (pointer_expression "*(code **)(*param_1 + 0x2c)" * (cast_expression "(code **)(*param_1 + 0x2c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x2c)" ( (binary_expression "*param_1 + 0x2c" (pointer_expression "*param_1" * identifier) + number_literal) )))) == (cast_expression "(code *)PTR_pbackfail_00435ee4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    return 0xffffffff;\n  }" { (return_statement "return 0xffffffff;" return number_literal ;) })) comment comment (expression_statement "uVar1 = (**(code **)(*param_1 + 0x2c))(param_1,0xffffffff);" (assignment_expression "uVar1 = (**(code **)(*param_1 + 0x2c))(param_1,0xffffffff)" identifier = (call_expression "(**(code **)(*param_1 + 0x2c))(param_1,0xffffffff)" (parenthesized_expression "(**(code **)(*param_1 + 0x2c))" ( (pointer_expression "**(code **)(*param_1 + 0x2c)" * (pointer_expression "*(code **)(*param_1 + 0x2c)" * (cast_expression "(code **)(*param_1 + 0x2c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x2c)" ( (binary_expression "*param_1 + 0x2c" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "(param_1,0xffffffff)" ( identifier , number_literal )))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "/* std::streambuf::sungetc() */\n\nuint __thiscall std::streambuf::sungetc(streambuf *this)\n\n{\n  uint uVar1;\n  \n  uVar1 = *(uint *)(this + 8);\n  if (*(uint *)(this + 4) < uVar1) {\n    *(uint *)(this + 8) = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }\n  if (*(code **)(*(int *)this + 0x2c) == (code *)PTR_pbackfail_00435ee4) {\n    return 0xffffffff;\n  }\n                    /* WARNING: Could not recover jumptable at 0x002c4550. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar1 = (**(code **)(*(int *)this + 0x2c))(this,0xffffffff);\n  return uVar1;\n}\n\n" comment (function_definition "uint __thiscall std::streambuf::sungetc(streambuf *this)\n\n{\n  uint uVar1;\n  \n  uVar1 = *(uint *)(this + 8);\n  if (*(uint *)(this + 4) < uVar1) {\n    *(uint *)(this + 8) = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }\n  if (*(code **)(*(int *)this + 0x2c) == (code *)PTR_pbackfail_00435ee4) {\n    return 0xffffffff;\n  }\n                    /* WARNING: Could not recover jumptable at 0x002c4550. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar1 = (**(code **)(*(int *)this + 0x2c))(this,0xffffffff);\n  return uVar1;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::streambuf::" identifier : : identifier : :) (function_declarator "sungetc(streambuf *this)" identifier (parameter_list "(streambuf *this)" ( (parameter_declaration "streambuf *this" type_identifier (pointer_declarator "*this" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = *(uint *)(this + 8);\n  if (*(uint *)(this + 4) < uVar1) {\n    *(uint *)(this + 8) = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }\n  if (*(code **)(*(int *)this + 0x2c) == (code *)PTR_pbackfail_00435ee4) {\n    return 0xffffffff;\n  }\n                    /* WARNING: Could not recover jumptable at 0x002c4550. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n  uVar1 = (**(code **)(*(int *)this + 0x2c))(this,0xffffffff);\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = *(uint *)(this + 8);" (assignment_expression "uVar1 = *(uint *)(this + 8)" identifier = (pointer_expression "*(uint *)(this + 8)" * (cast_expression "(uint *)(this + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) ))))) ;) (if_statement "if (*(uint *)(this + 4) < uVar1) {\n    *(uint *)(this + 8) = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }" if (parenthesized_expression "(*(uint *)(this + 4) < uVar1)" ( (binary_expression "*(uint *)(this + 4) < uVar1" (pointer_expression "*(uint *)(this + 4)" * (cast_expression "(uint *)(this + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) < identifier) )) (compound_statement "{\n    *(uint *)(this + 8) = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }" { (expression_statement "*(uint *)(this + 8) = uVar1 - 1;" (assignment_expression "*(uint *)(this + 8) = uVar1 - 1" (pointer_expression "*(uint *)(this + 8)" * (cast_expression "(uint *)(this + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = (binary_expression "uVar1 - 1" identifier - number_literal)) ;) (return_statement "return (uint)*(byte *)(uVar1 - 1);" return (binary_expression "(uint)*(byte *)(uVar1 - 1)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(uVar1 - 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar1 - 1)" ( (binary_expression "uVar1 - 1" identifier - number_literal) )))) ;) })) (if_statement "if (*(code **)(*(int *)this + 0x2c) == (code *)PTR_pbackfail_00435ee4) {\n    return 0xffffffff;\n  }" if (parenthesized_expression "(*(code **)(*(int *)this + 0x2c) == (code *)PTR_pbackfail_00435ee4)" ( (binary_expression "*(code **)(*(int *)this + 0x2c) == (code *)PTR_pbackfail_00435ee4" (pointer_expression "*(code **)(*(int *)this + 0x2c)" * (cast_expression "(code **)(*(int *)this + 0x2c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)this + 0x2c)" ( (binary_expression "*(int *)this + 0x2c" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) )))) == (cast_expression "(code *)PTR_pbackfail_00435ee4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    return 0xffffffff;\n  }" { (return_statement "return 0xffffffff;" return number_literal ;) })) comment comment (expression_statement "uVar1 = (**(code **)(*(int *)this + 0x2c))(this,0xffffffff);" (assignment_expression "uVar1 = (**(code **)(*(int *)this + 0x2c))(this,0xffffffff)" identifier = (call_expression "(**(code **)(*(int *)this + 0x2c))(this,0xffffffff)" (parenthesized_expression "(**(code **)(*(int *)this + 0x2c))" ( (pointer_expression "**(code **)(*(int *)this + 0x2c)" * (pointer_expression "*(code **)(*(int *)this + 0x2c)" * (cast_expression "(code **)(*(int *)this + 0x2c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)this + 0x2c)" ( (binary_expression "*(int *)this + 0x2c" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )) (argument_list "(this,0xffffffff)" ( identifier , number_literal )))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "uint FUN_002c4508(int *param_1)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_1[2];\n  if ((uint)param_1[1] < uVar1) {\n    param_1[2] = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }\n  if (*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4) {\n    return 0xffffffff;\n  }\n                    \n                    \n  uVar1 = (**(code **)(*param_1 + 0x2c))(param_1,0xffffffff);\n  return uVar1;\n}\n\n" (function_definition "uint FUN_002c4508(int *param_1)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_1[2];\n  if ((uint)param_1[1] < uVar1) {\n    param_1[2] = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }\n  if (*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4) {\n    return 0xffffffff;\n  }\n                    \n                    \n  uVar1 = (**(code **)(*param_1 + 0x2c))(param_1,0xffffffff);\n  return uVar1;\n}" type_identifier (function_declarator "FUN_002c4508(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = param_1[2];\n  if ((uint)param_1[1] < uVar1) {\n    param_1[2] = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }\n  if (*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4) {\n    return 0xffffffff;\n  }\n                    \n                    \n  uVar1 = (**(code **)(*param_1 + 0x2c))(param_1,0xffffffff);\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = param_1[2];" (assignment_expression "uVar1 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) (if_statement "if ((uint)param_1[1] < uVar1) {\n    param_1[2] = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }" if (parenthesized_expression "((uint)param_1[1] < uVar1)" ( (binary_expression "(uint)param_1[1] < uVar1" (cast_expression "(uint)param_1[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) < identifier) )) (compound_statement "{\n    param_1[2] = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }" { (expression_statement "param_1[2] = uVar1 - 1;" (assignment_expression "param_1[2] = uVar1 - 1" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (binary_expression "uVar1 - 1" identifier - number_literal)) ;) (return_statement "return (uint)*(byte *)(uVar1 - 1);" return (binary_expression "(uint)*(byte *)(uVar1 - 1)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(uVar1 - 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar1 - 1)" ( (binary_expression "uVar1 - 1" identifier - number_literal) )))) ;) })) (if_statement "if (*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4) {\n    return 0xffffffff;\n  }" if (parenthesized_expression "(*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4)" ( (binary_expression "*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4" (pointer_expression "*(code **)(*param_1 + 0x2c)" * (cast_expression "(code **)(*param_1 + 0x2c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x2c)" ( (binary_expression "*param_1 + 0x2c" (pointer_expression "*param_1" * identifier) + number_literal) )))) == (cast_expression "(code *)PTR_pbackfail_00435ee4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    return 0xffffffff;\n  }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "uVar1 = (**(code **)(*param_1 + 0x2c))(param_1,0xffffffff);" (assignment_expression "uVar1 = (**(code **)(*param_1 + 0x2c))(param_1,0xffffffff)" identifier = (call_expression "(**(code **)(*param_1 + 0x2c))(param_1,0xffffffff)" (parenthesized_expression "(**(code **)(*param_1 + 0x2c))" ( (pointer_expression "**(code **)(*param_1 + 0x2c)" * (pointer_expression "*(code **)(*param_1 + 0x2c)" * (cast_expression "(code **)(*param_1 + 0x2c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x2c)" ( (binary_expression "*param_1 + 0x2c" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "(param_1,0xffffffff)" ( identifier , number_literal )))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) < IDENT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT - LIT)) ;) (return_statement return (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT - LIT) )))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT , LIT )))) ;) (return_statement return IDENT ;) })))
(function_definition "uint FUN_002c4508(int *param_1)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_1[2];\n  if ((uint)param_1[1] < uVar1) {\n    param_1[2] = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }\n  if (*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4) {\n    return 0xffffffff;\n  }\n                    \n                    \n  uVar1 = (**(code **)(*param_1 + 0x2c))(param_1,0xffffffff);\n  return uVar1;\n}" (type_identifier "uint") (function_declarator "FUN_002c4508(int *param_1)" (identifier "FUN_002c4508") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = param_1[2];\n  if ((uint)param_1[1] < uVar1) {\n    param_1[2] = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }\n  if (*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4) {\n    return 0xffffffff;\n  }\n                    \n                    \n  uVar1 = (**(code **)(*param_1 + 0x2c))(param_1,0xffffffff);\n  return uVar1;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (expression_statement "uVar1 = param_1[2];" (assignment_expression "uVar1 = param_1[2]" (identifier "uVar1") (= "=") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (if_statement "if ((uint)param_1[1] < uVar1) {\n    param_1[2] = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }" (if "if") (parenthesized_expression "((uint)param_1[1] < uVar1)" (( "(") (binary_expression "(uint)param_1[1] < uVar1" (cast_expression "(uint)param_1[1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (< "<") (identifier "uVar1")) () ")")) (compound_statement "{\n    param_1[2] = uVar1 - 1;\n    return (uint)*(byte *)(uVar1 - 1);\n  }" ({ "{") (expression_statement "param_1[2] = uVar1 - 1;" (assignment_expression "param_1[2] = uVar1 - 1" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (binary_expression "uVar1 - 1" (identifier "uVar1") (- "-") (number_literal "1"))) (; ";")) (return_statement "return (uint)*(byte *)(uVar1 - 1);" (return "return") (binary_expression "(uint)*(byte *)(uVar1 - 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(byte *)(uVar1 - 1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(uVar1 - 1)" (( "(") (binary_expression "uVar1 - 1" (identifier "uVar1") (- "-") (number_literal "1")) () ")")))) (; ";")) (} "}"))) (if_statement "if (*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4) {\n    return 0xffffffff;\n  }" (if "if") (parenthesized_expression "(*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4)" (( "(") (binary_expression "*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4" (pointer_expression "*(code **)(*param_1 + 0x2c)" (* "*") (cast_expression "(code **)(*param_1 + 0x2c)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_1 + 0x2c)" (( "(") (binary_expression "*param_1 + 0x2c" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x2c")) () ")")))) (== "==") (cast_expression "(code *)PTR_pbackfail_00435ee4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_pbackfail_00435ee4"))) () ")")) (compound_statement "{\n    return 0xffffffff;\n  }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (expression_statement "uVar1 = (**(code **)(*param_1 + 0x2c))(param_1,0xffffffff);" (assignment_expression "uVar1 = (**(code **)(*param_1 + 0x2c))(param_1,0xffffffff)" (identifier "uVar1") (= "=") (call_expression "(**(code **)(*param_1 + 0x2c))(param_1,0xffffffff)" (parenthesized_expression "(**(code **)(*param_1 + 0x2c))" (( "(") (pointer_expression "**(code **)(*param_1 + 0x2c)" (* "*") (pointer_expression "*(code **)(*param_1 + 0x2c)" (* "*") (cast_expression "(code **)(*param_1 + 0x2c)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_1 + 0x2c)" (( "(") (binary_expression "*param_1 + 0x2c" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x2c")) () ")"))))) () ")")) (argument_list "(param_1,0xffffffff)" (( "(") (identifier "param_1") (, ",") (number_literal "0xffffffff") () ")")))) (; ";")) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

/* std::streambuf::sungetc() */

type_1 __thiscall std::type_2::function_1(type_2 *var_1)

{
  type_1 var_2;
  
  var_2 = *(type_1 *)(var_1 + 8);
  if (*(type_1 *)(var_1 + 4) < var_2) {
    *(type_1 *)(var_1 + 8) = var_2 - 1;
    return (type_1)*(type_3 *)(var_2 - 1);
  }
  if (*(type_4 **)(*(int *)var_1 + 0x2c) == (type_4 *)PTR_pbackfail_00435ee4) {
    return 0xffffffff;
  }
                    /* WARNING: Could not recover jumptable at 0x002c4550. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  var_2 = (**(type_4 **)(*(int *)var_1 + 0x2c))(var_1,0xffffffff);
  return var_2;
}


(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))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (number_literal))) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))) (return_statement (binary_expression left: (parenthesized_expression (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))) arguments: (argument_list (identifier) (number_literal))))) (return_statement (identifier)))))

uint MASKED(int *param_1)

{
  uint uVar1;
  
  uVar1 = param_1[2];
  if ((uint)param_1[1] < uVar1) {
    param_1[2] = uVar1 - 1;
    return (uint)*(byte *)(uVar1 - 1);
  }
  if (*(code **)(*param_1 + 0x2c) == (code *)PTR_pbackfail_00435ee4) {
    return 0xffffffff;
  }
                    /* WARNING: Could not recover jumptable at 0x002c4550. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  uVar1 = (**(code **)(*param_1 + 0x2c))(param_1,0xffffffff);
  return uVar1;
}

