
/* stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::pbackfail(unsigned int) */

void __thiscall
stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>>::pbackfail
          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)

{
  if (param_1 == 0xffffffff) {
    if (*(int *)(this + 0x24) != -1) {
      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(this + 0x24),*(undefined4 *)(this + 0x20));
    }
    *(undefined4 *)(this + 0x24) = 0xffffffff;
    return;
  }
  (*(code *)PTR_ungetwc_004c5a78)(param_1,*(undefined4 *)(this + 0x20));
  *(undefined4 *)(this + 0x24) = 0xffffffff;
  return;
}



void FUN_0037463c(int param_1,int param_2)

{
  if (param_2 == -1) {
    if (*(int *)(param_1 + 0x24) != -1) {
      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));
    }
    *(undefined4 *)(param_1 + 0x24) = 0xffffffff;
    return;
  }
  (*(code *)PTR_ungetwc_004c5a78)(param_2,*(undefined4 *)(param_1 + 0x20));
  *(undefined4 *)(param_1 + 0x24) = 0xffffffff;
  return;
}


lui gp,0x15
addiu gp,gp,0x4c04
addu gp,gp,t9
addiu sp,sp,-0x20
li v0,-0x1
sw gp,0x10(sp)
sw s0,0x18(sp)
or s0,a0,zero
bne a1,v0,0x00374694
_sw ra,0x1c(sp)
lw v0,0x24(a0)
beq v0,a1,0x0037467c
_lw t9,-0x37c8(gp)
or a0,v0,zero
jalr t9
_lw a1,0x20(s0)
lw ra,0x1c(sp)
li v1,-0x1
sw v1,0x24(s0)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x20
lw t9,-0x37c8(gp)
or a0,a1,zero
jalr t9
_lw a1,0x20(s0)
li v1,-0x1
lw ra,0x1c(sp)
sw v1,0x24(s0)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x20
(translation_unit "void FUN_0037463c(int param_1,int param_2)\n\n{\n  if (param_2 == -1) {\n    if (*(int *)(param_1 + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }\n    *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n    return;\n  }\n  (*(code *)PTR_ungetwc_004c5a78)(param_2,*(undefined4 *)(param_1 + 0x20));\n  *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n  return;\n}\n\n" (function_definition "void FUN_0037463c(int param_1,int param_2)\n\n{\n  if (param_2 == -1) {\n    if (*(int *)(param_1 + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }\n    *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n    return;\n  }\n  (*(code *)PTR_ungetwc_004c5a78)(param_2,*(undefined4 *)(param_1 + 0x20));\n  *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n  return;\n}" primitive_type (function_declarator "FUN_0037463c(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  if (param_2 == -1) {\n    if (*(int *)(param_1 + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }\n    *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n    return;\n  }\n  (*(code *)PTR_ungetwc_004c5a78)(param_2,*(undefined4 *)(param_1 + 0x20));\n  *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n  return;\n}" { (if_statement "if (param_2 == -1) {\n    if (*(int *)(param_1 + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }\n    *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n    return;\n  }" if (parenthesized_expression "(param_2 == -1)" ( (binary_expression "param_2 == -1" identifier == number_literal) )) (compound_statement "{\n    if (*(int *)(param_1 + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }\n    *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n    return;\n  }" { (if_statement "if (*(int *)(param_1 + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x24) != -1)" ( (binary_expression "*(int *)(param_1 + 0x24) != -1" (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }" { (expression_statement "(*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));" (call_expression "(*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20))" (parenthesized_expression "(*(code *)PTR_ungetwc_004c5a78)" ( (pointer_expression "*(code *)PTR_ungetwc_004c5a78" * (cast_expression "(code *)PTR_ungetwc_004c5a78" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20))" ( (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) ))) ;) })) (expression_statement "*(undefined4 *)(param_1 + 0x24) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0x24) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0x24)" * (cast_expression "(undefined4 *)(param_1 + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "(*(code *)PTR_ungetwc_004c5a78)(param_2,*(undefined4 *)(param_1 + 0x20));" (call_expression "(*(code *)PTR_ungetwc_004c5a78)(param_2,*(undefined4 *)(param_1 + 0x20))" (parenthesized_expression "(*(code *)PTR_ungetwc_004c5a78)" ( (pointer_expression "*(code *)PTR_ungetwc_004c5a78" * (cast_expression "(code *)PTR_ungetwc_004c5a78" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,*(undefined4 *)(param_1 + 0x20))" ( identifier , (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x24) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0x24) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0x24)" * (cast_expression "(undefined4 *)(param_1 + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "/* stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::pbackfail(unsigned int) */\n\nvoid __thiscall\nstdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>>::pbackfail\n          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)\n\n{\n  if (param_1 == 0xffffffff) {\n    if (*(int *)(this + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(this + 0x24),*(undefined4 *)(this + 0x20));\n    }\n    *(undefined4 *)(this + 0x24) = 0xffffffff;\n    return;\n  }\n  (*(code *)PTR_ungetwc_004c5a78)(param_1,*(undefined4 *)(this + 0x20));\n  *(undefined4 *)(this + 0x24) = 0xffffffff;\n  return;\n}\n\n" comment (declaration "void __thiscall\nstdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>>::pbackfail\n          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)\n\n{\n  if (param_1 == 0xffffffff) {\n    if (*(int *)(this + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(this + 0x24),*(undefined4 *)(this + 0x20));" primitive_type (ms_call_modifier "__thiscall" __thiscall) identifier (ERROR "<wchar_t" < identifier) , (ERROR "std::char_traits<wchar_t>>::" identifier : : identifier < identifier >> : :) (function_declarator "pbackfail\n          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)\n\n{\n  if (param_1 == 0xffffffff) {\n    if (*(int *)(this + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(this + 0x24),*(undefined4 *)(this + 0x20))" (function_declarator "pbackfail\n          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)\n\n{\n  if (param_1 == 0xffffffff) {\n    if (*(int *)(this + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)" (function_declarator "pbackfail\n          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)\n\n{\n  if (param_1 == 0xffffffff) {\n    if (*(int *)(this + 0x24) != -1)" (function_declarator "pbackfail\n          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)\n\n{\n  if (param_1 == 0xffffffff)" (function_declarator "pbackfail\n          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)" identifier (parameter_list "(stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)" ( (parameter_declaration "stdio_sync_filebuf<wchar_t" type_identifier (ERROR "<" <) identifier) , (parameter_declaration "std::char_traits<wchar_t>> *this" type_identifier (ERROR "::char_traits<wchar_t>>" : : identifier < identifier >>) (pointer_declarator "*this" * identifier)) , (parameter_declaration "uint param_1" type_identifier identifier) ))) (ERROR "{\n  if" { if) (parameter_list "(param_1 == 0xffffffff)" ( (parameter_declaration "param_1" type_identifier) (ERROR "== 0xffffffff" == number_literal) ))) (ERROR "{\n    if" { if) (parameter_list "(*(int *)(this + 0x24) != -1)" ( (parameter_declaration "*(int *)(this + 0x24)" type_identifier (abstract_pointer_declarator "*(int *)(this + 0x24)" * (abstract_function_declarator "(int *)(this + 0x24)" (abstract_function_declarator "(int *)" (parameter_list "(int *)" ( (parameter_declaration "int *" primitive_type (abstract_pointer_declarator "*" *)) ))) (parameter_list "(this + 0x24)" ( (parameter_declaration "this" type_identifier) (ERROR "+ 0x24" + number_literal) ))))) (ERROR "!= -1" != number_literal) ))) (ERROR "{" {) (parameter_list "(*(code *)PTR_ungetwc_004c5a78)" ( (parameter_declaration "*(code *)PTR_ungetwc_004c5a78" type_identifier (pointer_declarator "*(code *)PTR_ungetwc_004c5a78" * (ERROR "(code *)" (abstract_function_declarator "(code *)" (parameter_list "(code *)" ( (parameter_declaration "code *" type_identifier (abstract_pointer_declarator "*" *)) )))) identifier)) ))) (parameter_list "(*(int *)(this + 0x24),*(undefined4 *)(this + 0x20))" ( (parameter_declaration "*(int *)(this + 0x24)" type_identifier (abstract_pointer_declarator "*(int *)(this + 0x24)" * (abstract_function_declarator "(int *)(this + 0x24)" (abstract_function_declarator "(int *)" (parameter_list "(int *)" ( (parameter_declaration "int *" primitive_type (abstract_pointer_declarator "*" *)) ))) (parameter_list "(this + 0x24)" ( (parameter_declaration "this" type_identifier) (ERROR "+ 0x24" + number_literal) ))))) , (parameter_declaration "*(undefined4 *)(this + 0x20)" type_identifier (abstract_pointer_declarator "*(undefined4 *)(this + 0x20)" * (abstract_function_declarator "(undefined4 *)(this + 0x20)" (abstract_function_declarator "(undefined4 *)" (parameter_list "(undefined4 *)" ( (parameter_declaration "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ))) (parameter_list "(this + 0x20)" ( (parameter_declaration "this" type_identifier) (ERROR "+ 0x20" + number_literal) ))))) ))) ;) (ERROR "}" }) (expression_statement "*(undefined4 *)(this + 0x24) = 0xffffffff;" (assignment_expression "*(undefined4 *)(this + 0x24) = 0xffffffff" (pointer_expression "*(undefined4 *)(this + 0x24)" * (cast_expression "(undefined4 *)(this + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x24)" ( (binary_expression "this + 0x24" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) (ERROR "}" }) (expression_statement "(*(code *)PTR_ungetwc_004c5a78)(param_1,*(undefined4 *)(this + 0x20));" (call_expression "(*(code *)PTR_ungetwc_004c5a78)(param_1,*(undefined4 *)(this + 0x20))" (parenthesized_expression "(*(code *)PTR_ungetwc_004c5a78)" ( (pointer_expression "*(code *)PTR_ungetwc_004c5a78" * (cast_expression "(code *)PTR_ungetwc_004c5a78" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,*(undefined4 *)(this + 0x20))" ( identifier , (pointer_expression "*(undefined4 *)(this + 0x20)" * (cast_expression "(undefined4 *)(this + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x20)" ( (binary_expression "this + 0x20" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(this + 0x24) = 0xffffffff;" (assignment_expression "*(undefined4 *)(this + 0x24) = 0xffffffff" (pointer_expression "*(undefined4 *)(this + 0x24)" * (cast_expression "(undefined4 *)(this + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x24)" ( (binary_expression "this + 0x24" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) (ERROR "}" }))
(translation_unit "void FUN_0037463c(int param_1,int param_2)\n\n{\n  if (param_2 == -1) {\n    if (*(int *)(param_1 + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }\n    *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n    return;\n  }\n  (*(code *)PTR_ungetwc_004c5a78)(param_2,*(undefined4 *)(param_1 + 0x20));\n  *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n  return;\n}\n\n" (function_definition "void FUN_0037463c(int param_1,int param_2)\n\n{\n  if (param_2 == -1) {\n    if (*(int *)(param_1 + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }\n    *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n    return;\n  }\n  (*(code *)PTR_ungetwc_004c5a78)(param_2,*(undefined4 *)(param_1 + 0x20));\n  *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n  return;\n}" primitive_type (function_declarator "FUN_0037463c(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  if (param_2 == -1) {\n    if (*(int *)(param_1 + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }\n    *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n    return;\n  }\n  (*(code *)PTR_ungetwc_004c5a78)(param_2,*(undefined4 *)(param_1 + 0x20));\n  *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n  return;\n}" { (if_statement "if (param_2 == -1) {\n    if (*(int *)(param_1 + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }\n    *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n    return;\n  }" if (parenthesized_expression "(param_2 == -1)" ( (binary_expression "param_2 == -1" identifier == number_literal) )) (compound_statement "{\n    if (*(int *)(param_1 + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }\n    *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n    return;\n  }" { (if_statement "if (*(int *)(param_1 + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x24) != -1)" ( (binary_expression "*(int *)(param_1 + 0x24) != -1" (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }" { (expression_statement "(*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));" (call_expression "(*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20))" (parenthesized_expression "(*(code *)PTR_ungetwc_004c5a78)" ( (pointer_expression "*(code *)PTR_ungetwc_004c5a78" * (cast_expression "(code *)PTR_ungetwc_004c5a78" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20))" ( (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) ))) ;) })) (expression_statement "*(undefined4 *)(param_1 + 0x24) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0x24) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0x24)" * (cast_expression "(undefined4 *)(param_1 + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "(*(code *)PTR_ungetwc_004c5a78)(param_2,*(undefined4 *)(param_1 + 0x20));" (call_expression "(*(code *)PTR_ungetwc_004c5a78)(param_2,*(undefined4 *)(param_1 + 0x20))" (parenthesized_expression "(*(code *)PTR_ungetwc_004c5a78)" ( (pointer_expression "*(code *)PTR_ungetwc_004c5a78" * (cast_expression "(code *)PTR_ungetwc_004c5a78" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,*(undefined4 *)(param_1 + 0x20))" ( identifier , (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x24) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0x24) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0x24)" * (cast_expression "(undefined4 *)(param_1 + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })))
(function_definition "void FUN_0037463c(int param_1,int param_2)\n\n{\n  if (param_2 == -1) {\n    if (*(int *)(param_1 + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }\n    *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n    return;\n  }\n  (*(code *)PTR_ungetwc_004c5a78)(param_2,*(undefined4 *)(param_1 + 0x20));\n  *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0037463c(int param_1,int param_2)" (identifier "FUN_0037463c") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  if (param_2 == -1) {\n    if (*(int *)(param_1 + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }\n    *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n    return;\n  }\n  (*(code *)PTR_ungetwc_004c5a78)(param_2,*(undefined4 *)(param_1 + 0x20));\n  *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n  return;\n}" ({ "{") (if_statement "if (param_2 == -1) {\n    if (*(int *)(param_1 + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }\n    *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n    return;\n  }" (if "if") (parenthesized_expression "(param_2 == -1)" (( "(") (binary_expression "param_2 == -1" (identifier "param_2") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n    if (*(int *)(param_1 + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }\n    *(undefined4 *)(param_1 + 0x24) = 0xffffffff;\n    return;\n  }" ({ "{") (if_statement "if (*(int *)(param_1 + 0x24) != -1) {\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x24) != -1)" (( "(") (binary_expression "*(int *)(param_1 + 0x24) != -1" (pointer_expression "*(int *)(param_1 + 0x24)" (* "*") (cast_expression "(int *)(param_1 + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")")))) (!= "!=") (number_literal "-1")) () ")")) (compound_statement "{\n      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));\n    }" ({ "{") (expression_statement "(*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));" (call_expression "(*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20))" (parenthesized_expression "(*(code *)PTR_ungetwc_004c5a78)" (( "(") (pointer_expression "*(code *)PTR_ungetwc_004c5a78" (* "*") (cast_expression "(code *)PTR_ungetwc_004c5a78" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_ungetwc_004c5a78"))) () ")")) (argument_list "(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20))" (( "(") (pointer_expression "*(int *)(param_1 + 0x24)" (* "*") (cast_expression "(int *)(param_1 + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")")))) (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) () ")"))) (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(param_1 + 0x24) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0x24) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0x24)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x24)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")")))) (= "=") (number_literal "0xffffffff")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_ungetwc_004c5a78)(param_2,*(undefined4 *)(param_1 + 0x20));" (call_expression "(*(code *)PTR_ungetwc_004c5a78)(param_2,*(undefined4 *)(param_1 + 0x20))" (parenthesized_expression "(*(code *)PTR_ungetwc_004c5a78)" (( "(") (pointer_expression "*(code *)PTR_ungetwc_004c5a78" (* "*") (cast_expression "(code *)PTR_ungetwc_004c5a78" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_ungetwc_004c5a78"))) () ")")) (argument_list "(param_2,*(undefined4 *)(param_1 + 0x20))" (( "(") (identifier "param_2") (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x24) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0x24) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0x24)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x24)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")")))) (= "=") (number_literal "0xffffffff")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::pbackfail(unsigned int) */

void __thiscall
type_1<wchar_t,type_2::char_traits<wchar_t>>::function_1
          (type_1<wchar_t,type_2::char_traits<wchar_t>> *type_6,type_3 type_4)

{
  if (type_4 == 0xffffffff) {
    if (type_5*(int *)(type_6 + 0x24) != -1) {
      (type_5*(type_8 *)PTR_ungetwc_004c5a78)(type_5*(int *)(type_6 + 0x24),type_5*(type_7 *)(type_6 + 0x20));
    }
    *(type_7 *)(type_6 + 0x24) = 0xffffffff;
    return;
  }
  (*(type_8 *)PTR_ungetwc_004c5a78)(type_4,*(type_7 *)(type_6 + 0x20));
  *(type_7 *)(type_6 + 0x24) = 0xffffffff;
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (return_statement))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (return_statement))))

void MASKED(int param_1,int param_2)

{
  if (param_2 == -1) {
    if (*(int *)(param_1 + 0x24) != -1) {
      (*(code *)PTR_ungetwc_004c5a78)(*(int *)(param_1 + 0x24),*(undefined4 *)(param_1 + 0x20));
    }
    *(undefined4 *)(param_1 + 0x24) = 0xffffffff;
    return;
  }
  (*(code *)PTR_ungetwc_004c5a78)(param_2,*(undefined4 *)(param_1 + 0x20));
  *(undefined4 *)(param_1 + 0x24) = 0xffffffff;
  return;
}

