
size_t rpl_mbrtowc(wchar_t *pwc,char *s,size_t n,mbstate_t *ps)

{
  undefined3 extraout_var;
  size_t sVar1;
  _Bool _Var5;
  int iVar2;
  int *piVar3;
  undefined4 *puVar4;
  FILE *fp;
  uint uVar6;
  undefined *puVar7;
  wchar_t wc;
  FILE *local_14;
  
  local_14 = *(FILE **)PTR___stack_chk_guard_0002a2e8;
  if (s == (char *)0x0) {
    n = 1;
    s = PTR_DAT_0002a118 + -0x67a0;
    pwc = &wc;
  }
  else {
    if (n == 0) {
      sVar1 = 0xfffffffe;
      goto LAB_00017d38;
    }
    if (pwc == (wchar_t *)0x0) {
      pwc = &wc;
    }
  }
  sVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(pwc,s,n);
  if ((0xfffffffd < sVar1) && (_Var5 = hard_locale(0), CONCAT31(extraout_var,_Var5) == 0)) {
    *pwc = (uint)(byte)*s;
    sVar1 = 1;
  }
LAB_00017d38:
  if (local_14 != *(FILE **)PTR___stack_chk_guard_0002a2e8) {
    fp = local_14;
    puVar7 = PTR___stack_chk_fail_0002a2d0;
    (*(code *)PTR___stack_chk_fail_0002a2d0)();
    iVar2 = (**(code **)(puVar7 + 0x124fc))();
    uVar6 = fp->_flags;
    sVar1 = rpl_fclose(fp);
    if ((uVar6 & 0x20) == 0) {
      if (sVar1 != 0) {
        if (iVar2 == 0) {
          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();
          sVar1 = -(uint)(*piVar3 != 9);
        }
        else {
          sVar1 = 0xffffffff;
        }
      }
    }
    else if (sVar1 == 0) {
      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();
      *puVar4 = 0;
      sVar1 = 0xffffffff;
    }
    else {
      sVar1 = 0xffffffff;
    }
    return sVar1;
  }
  return sVar1;
}



uint rpl_mbrtowc(uint *param_1,byte *param_2,int param_3)

{
  uint uVar1;
  int iVar2;
  int *piVar3;
  undefined4 *puVar4;
  uint *puVar5;
  uint uVar6;
  undefined *puVar7;
  uint uStack_18;
  uint *local_14;
  
  local_14 = *(uint **)PTR___stack_chk_guard_0002a2e8;
  if (param_2 == (byte *)0x0) {
    param_3 = 1;
    param_2 = PTR_DAT_0002a118 + -0x67a0;
    param_1 = &uStack_18;
  }
  else {
    if (param_3 == 0) {
      uVar1 = 0xfffffffe;
      goto LAB_00017d38;
    }
    if (param_1 == (uint *)0x0) {
      param_1 = &uStack_18;
    }
  }
  uVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3);
  if ((0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0)) {
    *param_1 = (uint)*param_2;
    uVar1 = 1;
  }
LAB_00017d38:
  if (local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8) {
    puVar5 = local_14;
    puVar7 = PTR___stack_chk_fail_0002a2d0;
    (*(code *)PTR___stack_chk_fail_0002a2d0)();
    iVar2 = (**(code **)(puVar7 + 0x124fc))();
    uVar6 = *puVar5;
    uVar1 = rpl_fclose(puVar5);
    if ((uVar6 & 0x20) == 0) {
      if (uVar1 != 0) {
        if (iVar2 == 0) {
          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();
          uVar1 = -(uint)(*piVar3 != 9);
        }
        else {
          uVar1 = 0xffffffff;
        }
      }
    }
    else if (uVar1 == 0) {
      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();
      *puVar4 = 0;
      uVar1 = 0xffffffff;
    }
    else {
      uVar1 = 0xffffffff;
    }
    return uVar1;
  }
  return uVar1;
}


lui gp,0x2
addiu gp,gp,-0x5be0
addu gp,gp,t9
addiu sp,sp,-0x30
sw ra,0x2c(sp)
sw s2,0x28(sp)
sw s1,0x24(sp)
sw s0,0x20(sp)
sw gp,0x10(sp)
lw v0,-0x7df8(gp)
lw v0,0x0(v0)
sw v0,0x1c(sp)
beq a1,zero,0x00017d68
_nop
or s2,a0,zero
beq a2,zero,0x00017da4
_or s0,a1,zero
beq a0,zero,0x00017d60
_nop
or a1,s0,zero
or a0,s2,zero
lw t9,-0x7e2c(gp)
jalr t9
_nop
lw gp,0x10(sp)
or s1,v0,zero
sltiu v0,v0,-0x2
beq v0,zero,0x00017d7c
_or a0,zero,zero
or v0,s1,zero
lw a0,0x1c(sp)
lw v1,-0x7df8(gp)
lw v1,0x0(v1)
bne a0,v1,0x00017dac
_lw ra,0x2c(sp)
lw s2,0x28(sp)
lw s1,0x24(sp)
lw s0,0x20(sp)
jr ra
_addiu sp,sp,0x30
b 0x00017d0c
_addiu s2,sp,0x18
li a2,0x1
lw s0,-0x7fc8(gp)
addiu s0,s0,-0x67a0
b 0x00017d0c
_addiu s2,sp,0x18
lw t9,-0x7ee8(gp)
bal 0x00017ea0
_nop
lw gp,0x10(sp)
bne v0,zero,0x00017d38
_or v0,s1,zero
lbu v0,0x0(s0)
sw v0,0x0(s2)
b 0x00017d34
_li s1,0x1
b 0x00017d34
_li s1,-0x2
lw t9,-0x7e10(gp)
jalr t9
_nop
nop
nop
(translation_unit "uint rpl_mbrtowc(uint *param_1,byte *param_2,int param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint *puVar5;\n  uint uVar6;\n  undefined *puVar7;\n  uint uStack_18;\n  uint *local_14;\n  \n  local_14 = *(uint **)PTR___stack_chk_guard_0002a2e8;\n  if (param_2 == (byte *)0x0) {\n    param_3 = 1;\n    param_2 = PTR_DAT_0002a118 + -0x67a0;\n    param_1 = &uStack_18;\n  }\n  else {\n    if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }\n  }\n  uVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3);\n  if ((0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0)) {\n    *param_1 = (uint)*param_2;\n    uVar1 = 1;\n  }\nLAB_00017d38:\n  if (local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8) {\n    puVar5 = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = *puVar5;\n    uVar1 = rpl_fclose(puVar5);\n    if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }\n    return uVar1;\n  }\n  return uVar1;\n}\n\n" (function_definition "uint rpl_mbrtowc(uint *param_1,byte *param_2,int param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint *puVar5;\n  uint uVar6;\n  undefined *puVar7;\n  uint uStack_18;\n  uint *local_14;\n  \n  local_14 = *(uint **)PTR___stack_chk_guard_0002a2e8;\n  if (param_2 == (byte *)0x0) {\n    param_3 = 1;\n    param_2 = PTR_DAT_0002a118 + -0x67a0;\n    param_1 = &uStack_18;\n  }\n  else {\n    if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }\n  }\n  uVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3);\n  if ((0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0)) {\n    *param_1 = (uint)*param_2;\n    uVar1 = 1;\n  }\nLAB_00017d38:\n  if (local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8) {\n    puVar5 = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = *puVar5;\n    uVar1 = rpl_fclose(puVar5);\n    if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }\n    return uVar1;\n  }\n  return uVar1;\n}" type_identifier (function_declarator "rpl_mbrtowc(uint *param_1,byte *param_2,int param_3)" identifier (parameter_list "(uint *param_1,byte *param_2,int param_3)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint *puVar5;\n  uint uVar6;\n  undefined *puVar7;\n  uint uStack_18;\n  uint *local_14;\n  \n  local_14 = *(uint **)PTR___stack_chk_guard_0002a2e8;\n  if (param_2 == (byte *)0x0) {\n    param_3 = 1;\n    param_2 = PTR_DAT_0002a118 + -0x67a0;\n    param_1 = &uStack_18;\n  }\n  else {\n    if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }\n  }\n  uVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3);\n  if ((0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0)) {\n    *param_1 = (uint)*param_2;\n    uVar1 = 1;\n  }\nLAB_00017d38:\n  if (local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8) {\n    puVar5 = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = *puVar5;\n    uVar1 = rpl_fclose(puVar5);\n    if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }\n    return uVar1;\n  }\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "uint *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "undefined *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "uint uStack_18;" type_identifier identifier ;) (declaration "uint *local_14;" type_identifier (pointer_declarator "*local_14" * identifier) ;) (expression_statement "local_14 = *(uint **)PTR___stack_chk_guard_0002a2e8;" (assignment_expression "local_14 = *(uint **)PTR___stack_chk_guard_0002a2e8" identifier = (pointer_expression "*(uint **)PTR___stack_chk_guard_0002a2e8" * (cast_expression "(uint **)PTR___stack_chk_guard_0002a2e8" ( (type_descriptor "uint **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (if_statement "if (param_2 == (byte *)0x0) {\n    param_3 = 1;\n    param_2 = PTR_DAT_0002a118 + -0x67a0;\n    param_1 = &uStack_18;\n  }\n  else {\n    if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }\n  }" if (parenthesized_expression "(param_2 == (byte *)0x0)" ( (binary_expression "param_2 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    param_3 = 1;\n    param_2 = PTR_DAT_0002a118 + -0x67a0;\n    param_1 = &uStack_18;\n  }" { (expression_statement "param_3 = 1;" (assignment_expression "param_3 = 1" identifier = number_literal) ;) (expression_statement "param_2 = PTR_DAT_0002a118 + -0x67a0;" (assignment_expression "param_2 = PTR_DAT_0002a118 + -0x67a0" identifier = (binary_expression "PTR_DAT_0002a118 + -0x67a0" identifier + number_literal)) ;) (expression_statement "param_1 = &uStack_18;" (assignment_expression "param_1 = &uStack_18" identifier = (pointer_expression "&uStack_18" & identifier)) ;) }) (else_clause "else {\n    if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }\n  }" else (compound_statement "{\n    if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }\n  }" { (if_statement "if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }" { (expression_statement "uVar1 = 0xfffffffe;" (assignment_expression "uVar1 = 0xfffffffe" identifier = number_literal) ;) (goto_statement "goto LAB_00017d38;" goto statement_identifier ;) })) (if_statement "if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }" if (parenthesized_expression "(param_1 == (uint *)0x0)" ( (binary_expression "param_1 == (uint *)0x0" identifier == (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      param_1 = &uStack_18;\n    }" { (expression_statement "param_1 = &uStack_18;" (assignment_expression "param_1 = &uStack_18" identifier = (pointer_expression "&uStack_18" & identifier)) ;) })) }))) (expression_statement "uVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3);" (assignment_expression "uVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3)" identifier = (call_expression "(*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3)" (parenthesized_expression "(*(code *)PTR_mbrtowc_0002a2b4)" ( (pointer_expression "*(code *)PTR_mbrtowc_0002a2b4" * (cast_expression "(code *)PTR_mbrtowc_0002a2b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) ;) (if_statement "if ((0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0)) {\n    *param_1 = (uint)*param_2;\n    uVar1 = 1;\n  }" if (parenthesized_expression "((0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0))" ( (binary_expression "(0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0)" (parenthesized_expression "(0xfffffffd < uVar1)" ( (binary_expression "0xfffffffd < uVar1" number_literal < identifier) )) && (parenthesized_expression "(iVar2 = hard_locale(0), iVar2 == 0)" ( (comma_expression "iVar2 = hard_locale(0), iVar2 == 0" (assignment_expression "iVar2 = hard_locale(0)" identifier = (call_expression "hard_locale(0)" identifier (argument_list "(0)" ( number_literal )))) , (binary_expression "iVar2 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    *param_1 = (uint)*param_2;\n    uVar1 = 1;\n  }" { (expression_statement "*param_1 = (uint)*param_2;" (assignment_expression "*param_1 = (uint)*param_2" (pointer_expression "*param_1" * identifier) = (binary_expression "(uint)*param_2" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" identifier = number_literal) ;) })) (labeled_statement "LAB_00017d38:\n  if (local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8) {\n    puVar5 = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = *puVar5;\n    uVar1 = rpl_fclose(puVar5);\n    if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }\n    return uVar1;\n  }" statement_identifier : (if_statement "if (local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8) {\n    puVar5 = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = *puVar5;\n    uVar1 = rpl_fclose(puVar5);\n    if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }\n    return uVar1;\n  }" if (parenthesized_expression "(local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8)" ( (binary_expression "local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8" identifier != (pointer_expression "*(uint **)PTR___stack_chk_guard_0002a2e8" * (cast_expression "(uint **)PTR___stack_chk_guard_0002a2e8" ( (type_descriptor "uint **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) )) (compound_statement "{\n    puVar5 = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = *puVar5;\n    uVar1 = rpl_fclose(puVar5);\n    if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }\n    return uVar1;\n  }" { (expression_statement "puVar5 = local_14;" (assignment_expression "puVar5 = local_14" identifier = identifier) ;) (expression_statement "puVar7 = PTR___stack_chk_fail_0002a2d0;" (assignment_expression "puVar7 = PTR___stack_chk_fail_0002a2d0" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_0002a2d0)();" (call_expression "(*(code *)PTR___stack_chk_fail_0002a2d0)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_0002a2d0)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_0002a2d0" * (cast_expression "(code *)PTR___stack_chk_fail_0002a2d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar2 = (**(code **)(puVar7 + 0x124fc))();" (assignment_expression "iVar2 = (**(code **)(puVar7 + 0x124fc))()" identifier = (call_expression "(**(code **)(puVar7 + 0x124fc))()" (parenthesized_expression "(**(code **)(puVar7 + 0x124fc))" ( (pointer_expression "**(code **)(puVar7 + 0x124fc)" * (pointer_expression "*(code **)(puVar7 + 0x124fc)" * (cast_expression "(code **)(puVar7 + 0x124fc)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar7 + 0x124fc)" ( (binary_expression "puVar7 + 0x124fc" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (expression_statement "uVar6 = *puVar5;" (assignment_expression "uVar6 = *puVar5" identifier = (pointer_expression "*puVar5" * identifier)) ;) (expression_statement "uVar1 = rpl_fclose(puVar5);" (assignment_expression "uVar1 = rpl_fclose(puVar5)" identifier = (call_expression "rpl_fclose(puVar5)" identifier (argument_list "(puVar5)" ( identifier )))) ;) (if_statement "if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }" if (parenthesized_expression "((uVar6 & 0x20) == 0)" ( (binary_expression "(uVar6 & 0x20) == 0" (parenthesized_expression "(uVar6 & 0x20)" ( (binary_expression "uVar6 & 0x20" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }" { (if_statement "if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }" if (parenthesized_expression "(uVar1 != 0)" ( (binary_expression "uVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }" { (if_statement "if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }" { (expression_statement "piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();" (assignment_expression "piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))()" identifier = (cast_expression "(int *)(**(code **)(puVar7 + 0x124b4))()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)(puVar7 + 0x124b4))()" (parenthesized_expression "(**(code **)(puVar7 + 0x124b4))" ( (pointer_expression "**(code **)(puVar7 + 0x124b4)" * (pointer_expression "*(code **)(puVar7 + 0x124b4)" * (cast_expression "(code **)(puVar7 + 0x124b4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar7 + 0x124b4)" ( (binary_expression "puVar7 + 0x124b4" identifier + number_literal) ))))) )) (argument_list "()" ( ))))) ;) (expression_statement "uVar1 = -(uint)(*piVar3 != 9);" (assignment_expression "uVar1 = -(uint)(*piVar3 != 9)" identifier = (unary_expression "-(uint)(*piVar3 != 9)" - (call_expression "(uint)(*piVar3 != 9)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar3 != 9)" ( (binary_expression "*piVar3 != 9" (pointer_expression "*piVar3" * identifier) != number_literal) ))))) ;) }) (else_clause "else {\n          uVar1 = 0xffffffff;\n        }" else (compound_statement "{\n          uVar1 = 0xffffffff;\n        }" { (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) }))) })) }) (else_clause "else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }" else (if_statement "if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }" if (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }" { (expression_statement "puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();" (assignment_expression "puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))()" identifier = (cast_expression "(undefined4 *)(**(code **)(puVar7 + 0x124b4))()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)(puVar7 + 0x124b4))()" (parenthesized_expression "(**(code **)(puVar7 + 0x124b4))" ( (pointer_expression "**(code **)(puVar7 + 0x124b4)" * (pointer_expression "*(code **)(puVar7 + 0x124b4)" * (cast_expression "(code **)(puVar7 + 0x124b4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar7 + 0x124b4)" ( (binary_expression "puVar7 + 0x124b4" identifier + number_literal) ))))) )) (argument_list "()" ( ))))) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n      uVar1 = 0xffffffff;\n    }" else (compound_statement "{\n      uVar1 = 0xffffffff;\n    }" { (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) }))))) (return_statement "return uVar1;" return identifier ;) }))) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "size_t rpl_mbrtowc(wchar_t *pwc,char *s,size_t n,mbstate_t *ps)\n\n{\n  undefined3 extraout_var;\n  size_t sVar1;\n  _Bool _Var5;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  FILE *fp;\n  uint uVar6;\n  undefined *puVar7;\n  wchar_t wc;\n  FILE *local_14;\n  \n  local_14 = *(FILE **)PTR___stack_chk_guard_0002a2e8;\n  if (s == (char *)0x0) {\n    n = 1;\n    s = PTR_DAT_0002a118 + -0x67a0;\n    pwc = &wc;\n  }\n  else {\n    if (n == 0) {\n      sVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (pwc == (wchar_t *)0x0) {\n      pwc = &wc;\n    }\n  }\n  sVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(pwc,s,n);\n  if ((0xfffffffd < sVar1) && (_Var5 = hard_locale(0), CONCAT31(extraout_var,_Var5) == 0)) {\n    *pwc = (uint)(byte)*s;\n    sVar1 = 1;\n  }\nLAB_00017d38:\n  if (local_14 != *(FILE **)PTR___stack_chk_guard_0002a2e8) {\n    fp = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = fp->_flags;\n    sVar1 = rpl_fclose(fp);\n    if ((uVar6 & 0x20) == 0) {\n      if (sVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          sVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          sVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (sVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      sVar1 = 0xffffffff;\n    }\n    else {\n      sVar1 = 0xffffffff;\n    }\n    return sVar1;\n  }\n  return sVar1;\n}\n\n" (function_definition "size_t rpl_mbrtowc(wchar_t *pwc,char *s,size_t n,mbstate_t *ps)\n\n{\n  undefined3 extraout_var;\n  size_t sVar1;\n  _Bool _Var5;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  FILE *fp;\n  uint uVar6;\n  undefined *puVar7;\n  wchar_t wc;\n  FILE *local_14;\n  \n  local_14 = *(FILE **)PTR___stack_chk_guard_0002a2e8;\n  if (s == (char *)0x0) {\n    n = 1;\n    s = PTR_DAT_0002a118 + -0x67a0;\n    pwc = &wc;\n  }\n  else {\n    if (n == 0) {\n      sVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (pwc == (wchar_t *)0x0) {\n      pwc = &wc;\n    }\n  }\n  sVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(pwc,s,n);\n  if ((0xfffffffd < sVar1) && (_Var5 = hard_locale(0), CONCAT31(extraout_var,_Var5) == 0)) {\n    *pwc = (uint)(byte)*s;\n    sVar1 = 1;\n  }\nLAB_00017d38:\n  if (local_14 != *(FILE **)PTR___stack_chk_guard_0002a2e8) {\n    fp = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = fp->_flags;\n    sVar1 = rpl_fclose(fp);\n    if ((uVar6 & 0x20) == 0) {\n      if (sVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          sVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          sVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (sVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      sVar1 = 0xffffffff;\n    }\n    else {\n      sVar1 = 0xffffffff;\n    }\n    return sVar1;\n  }\n  return sVar1;\n}" primitive_type (function_declarator "rpl_mbrtowc(wchar_t *pwc,char *s,size_t n,mbstate_t *ps)" identifier (parameter_list "(wchar_t *pwc,char *s,size_t n,mbstate_t *ps)" ( (parameter_declaration "wchar_t *pwc" type_identifier (pointer_declarator "*pwc" * identifier)) , (parameter_declaration "char *s" primitive_type (pointer_declarator "*s" * identifier)) , (parameter_declaration "size_t n" primitive_type identifier) , (parameter_declaration "mbstate_t *ps" type_identifier (pointer_declarator "*ps" * identifier)) ))) (compound_statement "{\n  undefined3 extraout_var;\n  size_t sVar1;\n  _Bool _Var5;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  FILE *fp;\n  uint uVar6;\n  undefined *puVar7;\n  wchar_t wc;\n  FILE *local_14;\n  \n  local_14 = *(FILE **)PTR___stack_chk_guard_0002a2e8;\n  if (s == (char *)0x0) {\n    n = 1;\n    s = PTR_DAT_0002a118 + -0x67a0;\n    pwc = &wc;\n  }\n  else {\n    if (n == 0) {\n      sVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (pwc == (wchar_t *)0x0) {\n      pwc = &wc;\n    }\n  }\n  sVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(pwc,s,n);\n  if ((0xfffffffd < sVar1) && (_Var5 = hard_locale(0), CONCAT31(extraout_var,_Var5) == 0)) {\n    *pwc = (uint)(byte)*s;\n    sVar1 = 1;\n  }\nLAB_00017d38:\n  if (local_14 != *(FILE **)PTR___stack_chk_guard_0002a2e8) {\n    fp = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = fp->_flags;\n    sVar1 = rpl_fclose(fp);\n    if ((uVar6 & 0x20) == 0) {\n      if (sVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          sVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          sVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (sVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      sVar1 = 0xffffffff;\n    }\n    else {\n      sVar1 = 0xffffffff;\n    }\n    return sVar1;\n  }\n  return sVar1;\n}" { (declaration "undefined3 extraout_var;" type_identifier identifier ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "_Bool _Var5;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "FILE *fp;" type_identifier (pointer_declarator "*fp" * identifier) ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "undefined *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "wchar_t wc;" type_identifier identifier ;) (declaration "FILE *local_14;" type_identifier (pointer_declarator "*local_14" * identifier) ;) (expression_statement "local_14 = *(FILE **)PTR___stack_chk_guard_0002a2e8;" (assignment_expression "local_14 = *(FILE **)PTR___stack_chk_guard_0002a2e8" identifier = (pointer_expression "*(FILE **)PTR___stack_chk_guard_0002a2e8" * (cast_expression "(FILE **)PTR___stack_chk_guard_0002a2e8" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (if_statement "if (s == (char *)0x0) {\n    n = 1;\n    s = PTR_DAT_0002a118 + -0x67a0;\n    pwc = &wc;\n  }\n  else {\n    if (n == 0) {\n      sVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (pwc == (wchar_t *)0x0) {\n      pwc = &wc;\n    }\n  }" if (parenthesized_expression "(s == (char *)0x0)" ( (binary_expression "s == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    n = 1;\n    s = PTR_DAT_0002a118 + -0x67a0;\n    pwc = &wc;\n  }" { (expression_statement "n = 1;" (assignment_expression "n = 1" identifier = number_literal) ;) (expression_statement "s = PTR_DAT_0002a118 + -0x67a0;" (assignment_expression "s = PTR_DAT_0002a118 + -0x67a0" identifier = (binary_expression "PTR_DAT_0002a118 + -0x67a0" identifier + number_literal)) ;) (expression_statement "pwc = &wc;" (assignment_expression "pwc = &wc" identifier = (pointer_expression "&wc" & identifier)) ;) }) (else_clause "else {\n    if (n == 0) {\n      sVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (pwc == (wchar_t *)0x0) {\n      pwc = &wc;\n    }\n  }" else (compound_statement "{\n    if (n == 0) {\n      sVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (pwc == (wchar_t *)0x0) {\n      pwc = &wc;\n    }\n  }" { (if_statement "if (n == 0) {\n      sVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }" if (parenthesized_expression "(n == 0)" ( (binary_expression "n == 0" identifier == number_literal) )) (compound_statement "{\n      sVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }" { (expression_statement "sVar1 = 0xfffffffe;" (assignment_expression "sVar1 = 0xfffffffe" identifier = number_literal) ;) (goto_statement "goto LAB_00017d38;" goto statement_identifier ;) })) (if_statement "if (pwc == (wchar_t *)0x0) {\n      pwc = &wc;\n    }" if (parenthesized_expression "(pwc == (wchar_t *)0x0)" ( (binary_expression "pwc == (wchar_t *)0x0" identifier == (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pwc = &wc;\n    }" { (expression_statement "pwc = &wc;" (assignment_expression "pwc = &wc" identifier = (pointer_expression "&wc" & identifier)) ;) })) }))) (expression_statement "sVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(pwc,s,n);" (assignment_expression "sVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(pwc,s,n)" identifier = (call_expression "(*(code *)PTR_mbrtowc_0002a2b4)(pwc,s,n)" (parenthesized_expression "(*(code *)PTR_mbrtowc_0002a2b4)" ( (pointer_expression "*(code *)PTR_mbrtowc_0002a2b4" * (cast_expression "(code *)PTR_mbrtowc_0002a2b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pwc,s,n)" ( identifier , identifier , identifier )))) ;) (if_statement "if ((0xfffffffd < sVar1) && (_Var5 = hard_locale(0), CONCAT31(extraout_var,_Var5) == 0)) {\n    *pwc = (uint)(byte)*s;\n    sVar1 = 1;\n  }" if (parenthesized_expression "((0xfffffffd < sVar1) && (_Var5 = hard_locale(0), CONCAT31(extraout_var,_Var5) == 0))" ( (binary_expression "(0xfffffffd < sVar1) && (_Var5 = hard_locale(0), CONCAT31(extraout_var,_Var5) == 0)" (parenthesized_expression "(0xfffffffd < sVar1)" ( (binary_expression "0xfffffffd < sVar1" number_literal < identifier) )) && (parenthesized_expression "(_Var5 = hard_locale(0), CONCAT31(extraout_var,_Var5) == 0)" ( (comma_expression "_Var5 = hard_locale(0), CONCAT31(extraout_var,_Var5) == 0" (assignment_expression "_Var5 = hard_locale(0)" identifier = (call_expression "hard_locale(0)" identifier (argument_list "(0)" ( number_literal )))) , (binary_expression "CONCAT31(extraout_var,_Var5) == 0" (call_expression "CONCAT31(extraout_var,_Var5)" identifier (argument_list "(extraout_var,_Var5)" ( identifier , identifier ))) == number_literal)) ))) )) (compound_statement "{\n    *pwc = (uint)(byte)*s;\n    sVar1 = 1;\n  }" { (expression_statement "*pwc = (uint)(byte)*s;" (assignment_expression "*pwc = (uint)(byte)*s" (pointer_expression "*pwc" * identifier) = (binary_expression "(uint)(byte)*s" (call_expression "(uint)(byte)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(byte)" ( identifier ))) * identifier)) ;) (expression_statement "sVar1 = 1;" (assignment_expression "sVar1 = 1" identifier = number_literal) ;) })) (labeled_statement "LAB_00017d38:\n  if (local_14 != *(FILE **)PTR___stack_chk_guard_0002a2e8) {\n    fp = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = fp->_flags;\n    sVar1 = rpl_fclose(fp);\n    if ((uVar6 & 0x20) == 0) {\n      if (sVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          sVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          sVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (sVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      sVar1 = 0xffffffff;\n    }\n    else {\n      sVar1 = 0xffffffff;\n    }\n    return sVar1;\n  }" statement_identifier : (if_statement "if (local_14 != *(FILE **)PTR___stack_chk_guard_0002a2e8) {\n    fp = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = fp->_flags;\n    sVar1 = rpl_fclose(fp);\n    if ((uVar6 & 0x20) == 0) {\n      if (sVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          sVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          sVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (sVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      sVar1 = 0xffffffff;\n    }\n    else {\n      sVar1 = 0xffffffff;\n    }\n    return sVar1;\n  }" if (parenthesized_expression "(local_14 != *(FILE **)PTR___stack_chk_guard_0002a2e8)" ( (binary_expression "local_14 != *(FILE **)PTR___stack_chk_guard_0002a2e8" identifier != (pointer_expression "*(FILE **)PTR___stack_chk_guard_0002a2e8" * (cast_expression "(FILE **)PTR___stack_chk_guard_0002a2e8" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) )) (compound_statement "{\n    fp = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = fp->_flags;\n    sVar1 = rpl_fclose(fp);\n    if ((uVar6 & 0x20) == 0) {\n      if (sVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          sVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          sVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (sVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      sVar1 = 0xffffffff;\n    }\n    else {\n      sVar1 = 0xffffffff;\n    }\n    return sVar1;\n  }" { (expression_statement "fp = local_14;" (assignment_expression "fp = local_14" identifier = identifier) ;) (expression_statement "puVar7 = PTR___stack_chk_fail_0002a2d0;" (assignment_expression "puVar7 = PTR___stack_chk_fail_0002a2d0" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_0002a2d0)();" (call_expression "(*(code *)PTR___stack_chk_fail_0002a2d0)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_0002a2d0)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_0002a2d0" * (cast_expression "(code *)PTR___stack_chk_fail_0002a2d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar2 = (**(code **)(puVar7 + 0x124fc))();" (assignment_expression "iVar2 = (**(code **)(puVar7 + 0x124fc))()" identifier = (call_expression "(**(code **)(puVar7 + 0x124fc))()" (parenthesized_expression "(**(code **)(puVar7 + 0x124fc))" ( (pointer_expression "**(code **)(puVar7 + 0x124fc)" * (pointer_expression "*(code **)(puVar7 + 0x124fc)" * (cast_expression "(code **)(puVar7 + 0x124fc)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar7 + 0x124fc)" ( (binary_expression "puVar7 + 0x124fc" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (expression_statement "uVar6 = fp->_flags;" (assignment_expression "uVar6 = fp->_flags" identifier = (field_expression "fp->_flags" identifier -> field_identifier)) ;) (expression_statement "sVar1 = rpl_fclose(fp);" (assignment_expression "sVar1 = rpl_fclose(fp)" identifier = (call_expression "rpl_fclose(fp)" identifier (argument_list "(fp)" ( identifier )))) ;) (if_statement "if ((uVar6 & 0x20) == 0) {\n      if (sVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          sVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          sVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (sVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      sVar1 = 0xffffffff;\n    }\n    else {\n      sVar1 = 0xffffffff;\n    }" if (parenthesized_expression "((uVar6 & 0x20) == 0)" ( (binary_expression "(uVar6 & 0x20) == 0" (parenthesized_expression "(uVar6 & 0x20)" ( (binary_expression "uVar6 & 0x20" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      if (sVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          sVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          sVar1 = 0xffffffff;\n        }\n      }\n    }" { (if_statement "if (sVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          sVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          sVar1 = 0xffffffff;\n        }\n      }" if (parenthesized_expression "(sVar1 != 0)" ( (binary_expression "sVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          sVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          sVar1 = 0xffffffff;\n        }\n      }" { (if_statement "if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          sVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          sVar1 = 0xffffffff;\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          sVar1 = -(uint)(*piVar3 != 9);\n        }" { (expression_statement "piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();" (assignment_expression "piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))()" identifier = (cast_expression "(int *)(**(code **)(puVar7 + 0x124b4))()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)(puVar7 + 0x124b4))()" (parenthesized_expression "(**(code **)(puVar7 + 0x124b4))" ( (pointer_expression "**(code **)(puVar7 + 0x124b4)" * (pointer_expression "*(code **)(puVar7 + 0x124b4)" * (cast_expression "(code **)(puVar7 + 0x124b4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar7 + 0x124b4)" ( (binary_expression "puVar7 + 0x124b4" identifier + number_literal) ))))) )) (argument_list "()" ( ))))) ;) (expression_statement "sVar1 = -(uint)(*piVar3 != 9);" (assignment_expression "sVar1 = -(uint)(*piVar3 != 9)" identifier = (unary_expression "-(uint)(*piVar3 != 9)" - (call_expression "(uint)(*piVar3 != 9)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar3 != 9)" ( (binary_expression "*piVar3 != 9" (pointer_expression "*piVar3" * identifier) != number_literal) ))))) ;) }) (else_clause "else {\n          sVar1 = 0xffffffff;\n        }" else (compound_statement "{\n          sVar1 = 0xffffffff;\n        }" { (expression_statement "sVar1 = 0xffffffff;" (assignment_expression "sVar1 = 0xffffffff" identifier = number_literal) ;) }))) })) }) (else_clause "else if (sVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      sVar1 = 0xffffffff;\n    }\n    else {\n      sVar1 = 0xffffffff;\n    }" else (if_statement "if (sVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      sVar1 = 0xffffffff;\n    }\n    else {\n      sVar1 = 0xffffffff;\n    }" if (parenthesized_expression "(sVar1 == 0)" ( (binary_expression "sVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      sVar1 = 0xffffffff;\n    }" { (expression_statement "puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();" (assignment_expression "puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))()" identifier = (cast_expression "(undefined4 *)(**(code **)(puVar7 + 0x124b4))()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)(puVar7 + 0x124b4))()" (parenthesized_expression "(**(code **)(puVar7 + 0x124b4))" ( (pointer_expression "**(code **)(puVar7 + 0x124b4)" * (pointer_expression "*(code **)(puVar7 + 0x124b4)" * (cast_expression "(code **)(puVar7 + 0x124b4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar7 + 0x124b4)" ( (binary_expression "puVar7 + 0x124b4" identifier + number_literal) ))))) )) (argument_list "()" ( ))))) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "sVar1 = 0xffffffff;" (assignment_expression "sVar1 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n      sVar1 = 0xffffffff;\n    }" else (compound_statement "{\n      sVar1 = 0xffffffff;\n    }" { (expression_statement "sVar1 = 0xffffffff;" (assignment_expression "sVar1 = 0xffffffff" identifier = number_literal) ;) }))))) (return_statement "return sVar1;" return identifier ;) }))) (return_statement "return sVar1;" return identifier ;) })))
(translation_unit "uint rpl_mbrtowc(uint *param_1,byte *param_2,int param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint *puVar5;\n  uint uVar6;\n  undefined *puVar7;\n  uint uStack_18;\n  uint *local_14;\n  \n  local_14 = *(uint **)PTR___stack_chk_guard_0002a2e8;\n  if (param_2 == (byte *)0x0) {\n    param_3 = 1;\n    param_2 = PTR_DAT_0002a118 + -0x67a0;\n    param_1 = &uStack_18;\n  }\n  else {\n    if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }\n  }\n  uVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3);\n  if ((0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0)) {\n    *param_1 = (uint)*param_2;\n    uVar1 = 1;\n  }\nLAB_00017d38:\n  if (local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8) {\n    puVar5 = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = *puVar5;\n    uVar1 = rpl_fclose(puVar5);\n    if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }\n    return uVar1;\n  }\n  return uVar1;\n}\n\n" (function_definition "uint rpl_mbrtowc(uint *param_1,byte *param_2,int param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint *puVar5;\n  uint uVar6;\n  undefined *puVar7;\n  uint uStack_18;\n  uint *local_14;\n  \n  local_14 = *(uint **)PTR___stack_chk_guard_0002a2e8;\n  if (param_2 == (byte *)0x0) {\n    param_3 = 1;\n    param_2 = PTR_DAT_0002a118 + -0x67a0;\n    param_1 = &uStack_18;\n  }\n  else {\n    if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }\n  }\n  uVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3);\n  if ((0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0)) {\n    *param_1 = (uint)*param_2;\n    uVar1 = 1;\n  }\nLAB_00017d38:\n  if (local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8) {\n    puVar5 = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = *puVar5;\n    uVar1 = rpl_fclose(puVar5);\n    if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }\n    return uVar1;\n  }\n  return uVar1;\n}" type_identifier (function_declarator "rpl_mbrtowc(uint *param_1,byte *param_2,int param_3)" identifier (parameter_list "(uint *param_1,byte *param_2,int param_3)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint *puVar5;\n  uint uVar6;\n  undefined *puVar7;\n  uint uStack_18;\n  uint *local_14;\n  \n  local_14 = *(uint **)PTR___stack_chk_guard_0002a2e8;\n  if (param_2 == (byte *)0x0) {\n    param_3 = 1;\n    param_2 = PTR_DAT_0002a118 + -0x67a0;\n    param_1 = &uStack_18;\n  }\n  else {\n    if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }\n  }\n  uVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3);\n  if ((0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0)) {\n    *param_1 = (uint)*param_2;\n    uVar1 = 1;\n  }\nLAB_00017d38:\n  if (local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8) {\n    puVar5 = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = *puVar5;\n    uVar1 = rpl_fclose(puVar5);\n    if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }\n    return uVar1;\n  }\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "uint *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "undefined *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "uint uStack_18;" type_identifier identifier ;) (declaration "uint *local_14;" type_identifier (pointer_declarator "*local_14" * identifier) ;) (expression_statement "local_14 = *(uint **)PTR___stack_chk_guard_0002a2e8;" (assignment_expression "local_14 = *(uint **)PTR___stack_chk_guard_0002a2e8" identifier = (pointer_expression "*(uint **)PTR___stack_chk_guard_0002a2e8" * (cast_expression "(uint **)PTR___stack_chk_guard_0002a2e8" ( (type_descriptor "uint **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (if_statement "if (param_2 == (byte *)0x0) {\n    param_3 = 1;\n    param_2 = PTR_DAT_0002a118 + -0x67a0;\n    param_1 = &uStack_18;\n  }\n  else {\n    if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }\n  }" if (parenthesized_expression "(param_2 == (byte *)0x0)" ( (binary_expression "param_2 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    param_3 = 1;\n    param_2 = PTR_DAT_0002a118 + -0x67a0;\n    param_1 = &uStack_18;\n  }" { (expression_statement "param_3 = 1;" (assignment_expression "param_3 = 1" identifier = number_literal) ;) (expression_statement "param_2 = PTR_DAT_0002a118 + -0x67a0;" (assignment_expression "param_2 = PTR_DAT_0002a118 + -0x67a0" identifier = (binary_expression "PTR_DAT_0002a118 + -0x67a0" identifier + number_literal)) ;) (expression_statement "param_1 = &uStack_18;" (assignment_expression "param_1 = &uStack_18" identifier = (pointer_expression "&uStack_18" & identifier)) ;) }) (else_clause "else {\n    if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }\n  }" else (compound_statement "{\n    if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }\n  }" { (if_statement "if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }" { (expression_statement "uVar1 = 0xfffffffe;" (assignment_expression "uVar1 = 0xfffffffe" identifier = number_literal) ;) (goto_statement "goto LAB_00017d38;" goto statement_identifier ;) })) (if_statement "if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }" if (parenthesized_expression "(param_1 == (uint *)0x0)" ( (binary_expression "param_1 == (uint *)0x0" identifier == (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      param_1 = &uStack_18;\n    }" { (expression_statement "param_1 = &uStack_18;" (assignment_expression "param_1 = &uStack_18" identifier = (pointer_expression "&uStack_18" & identifier)) ;) })) }))) (expression_statement "uVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3);" (assignment_expression "uVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3)" identifier = (call_expression "(*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3)" (parenthesized_expression "(*(code *)PTR_mbrtowc_0002a2b4)" ( (pointer_expression "*(code *)PTR_mbrtowc_0002a2b4" * (cast_expression "(code *)PTR_mbrtowc_0002a2b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) ;) (if_statement "if ((0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0)) {\n    *param_1 = (uint)*param_2;\n    uVar1 = 1;\n  }" if (parenthesized_expression "((0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0))" ( (binary_expression "(0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0)" (parenthesized_expression "(0xfffffffd < uVar1)" ( (binary_expression "0xfffffffd < uVar1" number_literal < identifier) )) && (parenthesized_expression "(iVar2 = hard_locale(0), iVar2 == 0)" ( (comma_expression "iVar2 = hard_locale(0), iVar2 == 0" (assignment_expression "iVar2 = hard_locale(0)" identifier = (call_expression "hard_locale(0)" identifier (argument_list "(0)" ( number_literal )))) , (binary_expression "iVar2 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    *param_1 = (uint)*param_2;\n    uVar1 = 1;\n  }" { (expression_statement "*param_1 = (uint)*param_2;" (assignment_expression "*param_1 = (uint)*param_2" (pointer_expression "*param_1" * identifier) = (binary_expression "(uint)*param_2" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" identifier = number_literal) ;) })) (labeled_statement "LAB_00017d38:\n  if (local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8) {\n    puVar5 = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = *puVar5;\n    uVar1 = rpl_fclose(puVar5);\n    if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }\n    return uVar1;\n  }" statement_identifier : (if_statement "if (local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8) {\n    puVar5 = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = *puVar5;\n    uVar1 = rpl_fclose(puVar5);\n    if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }\n    return uVar1;\n  }" if (parenthesized_expression "(local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8)" ( (binary_expression "local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8" identifier != (pointer_expression "*(uint **)PTR___stack_chk_guard_0002a2e8" * (cast_expression "(uint **)PTR___stack_chk_guard_0002a2e8" ( (type_descriptor "uint **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) )) (compound_statement "{\n    puVar5 = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = *puVar5;\n    uVar1 = rpl_fclose(puVar5);\n    if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }\n    return uVar1;\n  }" { (expression_statement "puVar5 = local_14;" (assignment_expression "puVar5 = local_14" identifier = identifier) ;) (expression_statement "puVar7 = PTR___stack_chk_fail_0002a2d0;" (assignment_expression "puVar7 = PTR___stack_chk_fail_0002a2d0" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_0002a2d0)();" (call_expression "(*(code *)PTR___stack_chk_fail_0002a2d0)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_0002a2d0)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_0002a2d0" * (cast_expression "(code *)PTR___stack_chk_fail_0002a2d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar2 = (**(code **)(puVar7 + 0x124fc))();" (assignment_expression "iVar2 = (**(code **)(puVar7 + 0x124fc))()" identifier = (call_expression "(**(code **)(puVar7 + 0x124fc))()" (parenthesized_expression "(**(code **)(puVar7 + 0x124fc))" ( (pointer_expression "**(code **)(puVar7 + 0x124fc)" * (pointer_expression "*(code **)(puVar7 + 0x124fc)" * (cast_expression "(code **)(puVar7 + 0x124fc)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar7 + 0x124fc)" ( (binary_expression "puVar7 + 0x124fc" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (expression_statement "uVar6 = *puVar5;" (assignment_expression "uVar6 = *puVar5" identifier = (pointer_expression "*puVar5" * identifier)) ;) (expression_statement "uVar1 = rpl_fclose(puVar5);" (assignment_expression "uVar1 = rpl_fclose(puVar5)" identifier = (call_expression "rpl_fclose(puVar5)" identifier (argument_list "(puVar5)" ( identifier )))) ;) (if_statement "if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }" if (parenthesized_expression "((uVar6 & 0x20) == 0)" ( (binary_expression "(uVar6 & 0x20) == 0" (parenthesized_expression "(uVar6 & 0x20)" ( (binary_expression "uVar6 & 0x20" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }" { (if_statement "if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }" if (parenthesized_expression "(uVar1 != 0)" ( (binary_expression "uVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }" { (if_statement "if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }" { (expression_statement "piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();" (assignment_expression "piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))()" identifier = (cast_expression "(int *)(**(code **)(puVar7 + 0x124b4))()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)(puVar7 + 0x124b4))()" (parenthesized_expression "(**(code **)(puVar7 + 0x124b4))" ( (pointer_expression "**(code **)(puVar7 + 0x124b4)" * (pointer_expression "*(code **)(puVar7 + 0x124b4)" * (cast_expression "(code **)(puVar7 + 0x124b4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar7 + 0x124b4)" ( (binary_expression "puVar7 + 0x124b4" identifier + number_literal) ))))) )) (argument_list "()" ( ))))) ;) (expression_statement "uVar1 = -(uint)(*piVar3 != 9);" (assignment_expression "uVar1 = -(uint)(*piVar3 != 9)" identifier = (unary_expression "-(uint)(*piVar3 != 9)" - (call_expression "(uint)(*piVar3 != 9)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar3 != 9)" ( (binary_expression "*piVar3 != 9" (pointer_expression "*piVar3" * identifier) != number_literal) ))))) ;) }) (else_clause "else {\n          uVar1 = 0xffffffff;\n        }" else (compound_statement "{\n          uVar1 = 0xffffffff;\n        }" { (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) }))) })) }) (else_clause "else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }" else (if_statement "if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }" if (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }" { (expression_statement "puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();" (assignment_expression "puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))()" identifier = (cast_expression "(undefined4 *)(**(code **)(puVar7 + 0x124b4))()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)(puVar7 + 0x124b4))()" (parenthesized_expression "(**(code **)(puVar7 + 0x124b4))" ( (pointer_expression "**(code **)(puVar7 + 0x124b4)" * (pointer_expression "*(code **)(puVar7 + 0x124b4)" * (cast_expression "(code **)(puVar7 + 0x124b4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar7 + 0x124b4)" ( (binary_expression "puVar7 + 0x124b4" identifier + number_literal) ))))) )) (argument_list "()" ( ))))) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n      uVar1 = 0xffffffff;\n    }" else (compound_statement "{\n      uVar1 = 0xffffffff;\n    }" { (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) }))))) (return_statement "return uVar1;" return identifier ;) }))) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) })) }))) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) , (binary_expression IDENT == LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT))) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (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 IDENT + LIT) ))))) )) (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (unary_expression - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * IDENT) != LIT) ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))))) (return_statement return IDENT ;) }))) (return_statement return IDENT ;) })))
(function_definition "uint rpl_mbrtowc(uint *param_1,byte *param_2,int param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint *puVar5;\n  uint uVar6;\n  undefined *puVar7;\n  uint uStack_18;\n  uint *local_14;\n  \n  local_14 = *(uint **)PTR___stack_chk_guard_0002a2e8;\n  if (param_2 == (byte *)0x0) {\n    param_3 = 1;\n    param_2 = PTR_DAT_0002a118 + -0x67a0;\n    param_1 = &uStack_18;\n  }\n  else {\n    if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }\n  }\n  uVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3);\n  if ((0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0)) {\n    *param_1 = (uint)*param_2;\n    uVar1 = 1;\n  }\nLAB_00017d38:\n  if (local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8) {\n    puVar5 = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = *puVar5;\n    uVar1 = rpl_fclose(puVar5);\n    if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }\n    return uVar1;\n  }\n  return uVar1;\n}" (type_identifier "uint") (function_declarator "rpl_mbrtowc(uint *param_1,byte *param_2,int param_3)" (identifier "rpl_mbrtowc") (parameter_list "(uint *param_1,byte *param_2,int param_3)" (( "(") (parameter_declaration "uint *param_1" (type_identifier "uint") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "byte *param_2" (type_identifier "byte") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  int *piVar3;\n  undefined4 *puVar4;\n  uint *puVar5;\n  uint uVar6;\n  undefined *puVar7;\n  uint uStack_18;\n  uint *local_14;\n  \n  local_14 = *(uint **)PTR___stack_chk_guard_0002a2e8;\n  if (param_2 == (byte *)0x0) {\n    param_3 = 1;\n    param_2 = PTR_DAT_0002a118 + -0x67a0;\n    param_1 = &uStack_18;\n  }\n  else {\n    if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }\n  }\n  uVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3);\n  if ((0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0)) {\n    *param_1 = (uint)*param_2;\n    uVar1 = 1;\n  }\nLAB_00017d38:\n  if (local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8) {\n    puVar5 = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = *puVar5;\n    uVar1 = rpl_fclose(puVar5);\n    if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }\n    return uVar1;\n  }\n  return uVar1;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "uint *puVar5;" (type_identifier "uint") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "undefined *puVar7;" (type_identifier "undefined") (pointer_declarator "*puVar7" (* "*") (identifier "puVar7")) (; ";")) (declaration "uint uStack_18;" (type_identifier "uint") (identifier "uStack_18") (; ";")) (declaration "uint *local_14;" (type_identifier "uint") (pointer_declarator "*local_14" (* "*") (identifier "local_14")) (; ";")) (expression_statement "local_14 = *(uint **)PTR___stack_chk_guard_0002a2e8;" (assignment_expression "local_14 = *(uint **)PTR___stack_chk_guard_0002a2e8" (identifier "local_14") (= "=") (pointer_expression "*(uint **)PTR___stack_chk_guard_0002a2e8" (* "*") (cast_expression "(uint **)PTR___stack_chk_guard_0002a2e8" (( "(") (type_descriptor "uint **" (type_identifier "uint") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "PTR___stack_chk_guard_0002a2e8")))) (; ";")) (if_statement "if (param_2 == (byte *)0x0) {\n    param_3 = 1;\n    param_2 = PTR_DAT_0002a118 + -0x67a0;\n    param_1 = &uStack_18;\n  }\n  else {\n    if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }\n  }" (if "if") (parenthesized_expression "(param_2 == (byte *)0x0)" (( "(") (binary_expression "param_2 == (byte *)0x0" (identifier "param_2") (== "==") (cast_expression "(byte *)0x0" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    param_3 = 1;\n    param_2 = PTR_DAT_0002a118 + -0x67a0;\n    param_1 = &uStack_18;\n  }" ({ "{") (expression_statement "param_3 = 1;" (assignment_expression "param_3 = 1" (identifier "param_3") (= "=") (number_literal "1")) (; ";")) (expression_statement "param_2 = PTR_DAT_0002a118 + -0x67a0;" (assignment_expression "param_2 = PTR_DAT_0002a118 + -0x67a0" (identifier "param_2") (= "=") (binary_expression "PTR_DAT_0002a118 + -0x67a0" (identifier "PTR_DAT_0002a118") (+ "+") (number_literal "-0x67a0"))) (; ";")) (expression_statement "param_1 = &uStack_18;" (assignment_expression "param_1 = &uStack_18" (identifier "param_1") (= "=") (pointer_expression "&uStack_18" (& "&") (identifier "uStack_18"))) (; ";")) (} "}")) (else_clause "else {\n    if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }\n  }" (else "else") (compound_statement "{\n    if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }\n    if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }\n  }" ({ "{") (if_statement "if (param_3 == 0) {\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar1 = 0xfffffffe;\n      goto LAB_00017d38;\n    }" ({ "{") (expression_statement "uVar1 = 0xfffffffe;" (assignment_expression "uVar1 = 0xfffffffe" (identifier "uVar1") (= "=") (number_literal "0xfffffffe")) (; ";")) (goto_statement "goto LAB_00017d38;" (goto "goto") (statement_identifier "LAB_00017d38") (; ";")) (} "}"))) (if_statement "if (param_1 == (uint *)0x0) {\n      param_1 = &uStack_18;\n    }" (if "if") (parenthesized_expression "(param_1 == (uint *)0x0)" (( "(") (binary_expression "param_1 == (uint *)0x0" (identifier "param_1") (== "==") (cast_expression "(uint *)0x0" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      param_1 = &uStack_18;\n    }" ({ "{") (expression_statement "param_1 = &uStack_18;" (assignment_expression "param_1 = &uStack_18" (identifier "param_1") (= "=") (pointer_expression "&uStack_18" (& "&") (identifier "uStack_18"))) (; ";")) (} "}"))) (} "}")))) (expression_statement "uVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3);" (assignment_expression "uVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3)" (identifier "uVar1") (= "=") (call_expression "(*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3)" (parenthesized_expression "(*(code *)PTR_mbrtowc_0002a2b4)" (( "(") (pointer_expression "*(code *)PTR_mbrtowc_0002a2b4" (* "*") (cast_expression "(code *)PTR_mbrtowc_0002a2b4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_mbrtowc_0002a2b4"))) () ")")) (argument_list "(param_1,param_2,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if ((0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0)) {\n    *param_1 = (uint)*param_2;\n    uVar1 = 1;\n  }" (if "if") (parenthesized_expression "((0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0))" (( "(") (binary_expression "(0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0)" (parenthesized_expression "(0xfffffffd < uVar1)" (( "(") (binary_expression "0xfffffffd < uVar1" (number_literal "0xfffffffd") (< "<") (identifier "uVar1")) () ")")) (&& "&&") (parenthesized_expression "(iVar2 = hard_locale(0), iVar2 == 0)" (( "(") (comma_expression "iVar2 = hard_locale(0), iVar2 == 0" (assignment_expression "iVar2 = hard_locale(0)" (identifier "iVar2") (= "=") (call_expression "hard_locale(0)" (identifier "hard_locale") (argument_list "(0)" (( "(") (number_literal "0") () ")")))) (, ",") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    *param_1 = (uint)*param_2;\n    uVar1 = 1;\n  }" ({ "{") (expression_statement "*param_1 = (uint)*param_2;" (assignment_expression "*param_1 = (uint)*param_2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (binary_expression "(uint)*param_2" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "param_2"))) (; ";")) (expression_statement "uVar1 = 1;" (assignment_expression "uVar1 = 1" (identifier "uVar1") (= "=") (number_literal "1")) (; ";")) (} "}"))) (labeled_statement "LAB_00017d38:\n  if (local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8) {\n    puVar5 = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = *puVar5;\n    uVar1 = rpl_fclose(puVar5);\n    if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }\n    return uVar1;\n  }" (statement_identifier "LAB_00017d38") (: ":") (if_statement "if (local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8) {\n    puVar5 = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = *puVar5;\n    uVar1 = rpl_fclose(puVar5);\n    if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }\n    return uVar1;\n  }" (if "if") (parenthesized_expression "(local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8)" (( "(") (binary_expression "local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8" (identifier "local_14") (!= "!=") (pointer_expression "*(uint **)PTR___stack_chk_guard_0002a2e8" (* "*") (cast_expression "(uint **)PTR___stack_chk_guard_0002a2e8" (( "(") (type_descriptor "uint **" (type_identifier "uint") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "PTR___stack_chk_guard_0002a2e8")))) () ")")) (compound_statement "{\n    puVar5 = local_14;\n    puVar7 = PTR___stack_chk_fail_0002a2d0;\n    (*(code *)PTR___stack_chk_fail_0002a2d0)();\n    iVar2 = (**(code **)(puVar7 + 0x124fc))();\n    uVar6 = *puVar5;\n    uVar1 = rpl_fclose(puVar5);\n    if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }\n    return uVar1;\n  }" ({ "{") (expression_statement "puVar5 = local_14;" (assignment_expression "puVar5 = local_14" (identifier "puVar5") (= "=") (identifier "local_14")) (; ";")) (expression_statement "puVar7 = PTR___stack_chk_fail_0002a2d0;" (assignment_expression "puVar7 = PTR___stack_chk_fail_0002a2d0" (identifier "puVar7") (= "=") (identifier "PTR___stack_chk_fail_0002a2d0")) (; ";")) (expression_statement "(*(code *)PTR___stack_chk_fail_0002a2d0)();" (call_expression "(*(code *)PTR___stack_chk_fail_0002a2d0)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_0002a2d0)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_0002a2d0" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_0002a2d0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_0002a2d0"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar2 = (**(code **)(puVar7 + 0x124fc))();" (assignment_expression "iVar2 = (**(code **)(puVar7 + 0x124fc))()" (identifier "iVar2") (= "=") (call_expression "(**(code **)(puVar7 + 0x124fc))()" (parenthesized_expression "(**(code **)(puVar7 + 0x124fc))" (( "(") (pointer_expression "**(code **)(puVar7 + 0x124fc)" (* "*") (pointer_expression "*(code **)(puVar7 + 0x124fc)" (* "*") (cast_expression "(code **)(puVar7 + 0x124fc)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar7 + 0x124fc)" (( "(") (binary_expression "puVar7 + 0x124fc" (identifier "puVar7") (+ "+") (number_literal "0x124fc")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar6 = *puVar5;" (assignment_expression "uVar6 = *puVar5" (identifier "uVar6") (= "=") (pointer_expression "*puVar5" (* "*") (identifier "puVar5"))) (; ";")) (expression_statement "uVar1 = rpl_fclose(puVar5);" (assignment_expression "uVar1 = rpl_fclose(puVar5)" (identifier "uVar1") (= "=") (call_expression "rpl_fclose(puVar5)" (identifier "rpl_fclose") (argument_list "(puVar5)" (( "(") (identifier "puVar5") () ")")))) (; ";")) (if_statement "if ((uVar6 & 0x20) == 0) {\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }\n    else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }" (if "if") (parenthesized_expression "((uVar6 & 0x20) == 0)" (( "(") (binary_expression "(uVar6 & 0x20) == 0" (parenthesized_expression "(uVar6 & 0x20)" (( "(") (binary_expression "uVar6 & 0x20" (identifier "uVar6") (& "&") (number_literal "0x20")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }\n    }" ({ "{") (if_statement "if (uVar1 != 0) {\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }" (if "if") (parenthesized_expression "(uVar1 != 0)" (( "(") (binary_expression "uVar1 != 0" (identifier "uVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }\n      }" ({ "{") (if_statement "if (iVar2 == 0) {\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }\n        else {\n          uVar1 = 0xffffffff;\n        }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();\n          uVar1 = -(uint)(*piVar3 != 9);\n        }" ({ "{") (expression_statement "piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();" (assignment_expression "piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))()" (identifier "piVar3") (= "=") (cast_expression "(int *)(**(code **)(puVar7 + 0x124b4))()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(**(code **)(puVar7 + 0x124b4))()" (parenthesized_expression "(**(code **)(puVar7 + 0x124b4))" (( "(") (pointer_expression "**(code **)(puVar7 + 0x124b4)" (* "*") (pointer_expression "*(code **)(puVar7 + 0x124b4)" (* "*") (cast_expression "(code **)(puVar7 + 0x124b4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar7 + 0x124b4)" (( "(") (binary_expression "puVar7 + 0x124b4" (identifier "puVar7") (+ "+") (number_literal "0x124b4")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "uVar1 = -(uint)(*piVar3 != 9);" (assignment_expression "uVar1 = -(uint)(*piVar3 != 9)" (identifier "uVar1") (= "=") (unary_expression "-(uint)(*piVar3 != 9)" (- "-") (call_expression "(uint)(*piVar3 != 9)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*piVar3 != 9)" (( "(") (binary_expression "*piVar3 != 9" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (!= "!=") (number_literal "9")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n          uVar1 = 0xffffffff;\n        }" (else "else") (compound_statement "{\n          uVar1 = 0xffffffff;\n        }" ({ "{") (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" (identifier "uVar1") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")))) (} "}"))) (} "}")) (else_clause "else if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }" (else "else") (if_statement "if (uVar1 == 0) {\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }\n    else {\n      uVar1 = 0xffffffff;\n    }" (if "if") (parenthesized_expression "(uVar1 == 0)" (( "(") (binary_expression "uVar1 == 0" (identifier "uVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();\n      *puVar4 = 0;\n      uVar1 = 0xffffffff;\n    }" ({ "{") (expression_statement "puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();" (assignment_expression "puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))()" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)(**(code **)(puVar7 + 0x124b4))()" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(**(code **)(puVar7 + 0x124b4))()" (parenthesized_expression "(**(code **)(puVar7 + 0x124b4))" (( "(") (pointer_expression "**(code **)(puVar7 + 0x124b4)" (* "*") (pointer_expression "*(code **)(puVar7 + 0x124b4)" (* "*") (cast_expression "(code **)(puVar7 + 0x124b4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar7 + 0x124b4)" (( "(") (binary_expression "puVar7 + 0x124b4" (identifier "puVar7") (+ "+") (number_literal "0x124b4")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" (identifier "uVar1") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")) (else_clause "else {\n      uVar1 = 0xffffffff;\n    }" (else "else") (compound_statement "{\n      uVar1 = 0xffffffff;\n    }" ({ "{") (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" (identifier "uVar1") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")))))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

size_t function_1(type_1 *var_4,char *var_1,size_t var_3,type_2 *ps)

{
  type_3 extraout_var;
  size_t var_5;
  type_4 _Var5;
  int var_12;
  int *piVar3;
  type_5 *puVar4;
  type_6 *fp;
  type_7 var_11;
  type_8 *var_9;
  type_1 wc;
  type_6 *var_8;
  
  var_8 = *(type_6 **)PTR___stack_chk_guard_0002a2e8;
  if (var_1 == (char *)0x0) {
    var_3 = 1;
    var_1 = var_2 + -0x67a0;
    var_4 = &wc;
  }
  else {
    if (var_3 == 0) {
      var_5 = 0xfffffffe;
      goto LAB_00017d38;
    }
    if (var_4 == (type_1 *)0x0) {
      var_4 = &wc;
    }
  }
  var_5 = (*(type_9 *)PTR_mbrtowc_0002a2b4)(var_4,var_1,var_3);
  if ((0xfffffffd < var_5) && (_Var5 = var_6(0), var_7(extraout_var,_Var5) == 0)) {
    *var_4 = (type_7)(byte)*var_1;
    var_5 = 1;
  }
LAB_00017d38:
  if (var_8 != *(type_6 **)PTR___stack_chk_guard_0002a2e8) {
    fp = var_8;
    var_9 = PTR___stack_chk_fail_0002a2d0;
    (*(type_9 *)PTR___stack_chk_fail_0002a2d0)();
    var_12 = (**(type_9 **)(var_9 + 0x124fc))();
    var_11 = fp->_flags;
    var_5 = var_10(fp);
    if ((var_11 & 0x20) == 0) {
      if (var_5 != 0) {
        if (var_12 == 0) {
          piVar3 = (int *)(**(type_9 **)(var_9 + 0x124b4))();
          var_5 = -(type_7)(*piVar3 != 9);
        }
        else {
          var_5 = 0xffffffff;
        }
      }
    }
    else if (var_5 == 0) {
      puVar4 = (type_5 *)(**(type_9 **)(var_9 + 0x124b4))();
      *puVar4 = 0;
      var_5 = 0xffffffff;
    }
    else {
      var_5 = 0xffffffff;
    }
    return var_5;
  }
  return var_5;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier))))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier))))))))) (expression_statement (assignment_expression left: (identifier) right: (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) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal)))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (parenthesized_expression (identifier)) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (identifier))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (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))) (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: (identifier) right: (number_literal))))))) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (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: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (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: (identifier) right: (number_literal))))))) arguments: (argument_list))))) (expression_statement (assignment_expression left: (identifier) right: (unary_expression argument: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (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: (identifier) right: (number_literal))))))) arguments: (argument_list))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))))) (return_statement (identifier))))) (return_statement (identifier)))))

uint MASKED(uint *param_1,byte *param_2,int param_3)

{
  uint uVar1;
  int iVar2;
  int *piVar3;
  undefined4 *puVar4;
  uint *puVar5;
  uint uVar6;
  undefined *puVar7;
  uint uStack_18;
  uint *local_14;
  
  local_14 = *(uint **)PTR___stack_chk_guard_0002a2e8;
  if (param_2 == (byte *)0x0) {
    param_3 = 1;
    param_2 = PTR_DAT_0002a118 + -0x67a0;
    param_1 = &uStack_18;
  }
  else {
    if (param_3 == 0) {
      uVar1 = 0xfffffffe;
      goto LAB_00017d38;
    }
    if (param_1 == (uint *)0x0) {
      param_1 = &uStack_18;
    }
  }
  uVar1 = (*(code *)PTR_mbrtowc_0002a2b4)(param_1,param_2,param_3);
  if ((0xfffffffd < uVar1) && (iVar2 = hard_locale(0), iVar2 == 0)) {
    *param_1 = (uint)*param_2;
    uVar1 = 1;
  }
LAB_00017d38:
  if (local_14 != *(uint **)PTR___stack_chk_guard_0002a2e8) {
    puVar5 = local_14;
    puVar7 = PTR___stack_chk_fail_0002a2d0;
    (*(code *)PTR___stack_chk_fail_0002a2d0)();
    iVar2 = (**(code **)(puVar7 + 0x124fc))();
    uVar6 = *puVar5;
    uVar1 = rpl_fclose(puVar5);
    if ((uVar6 & 0x20) == 0) {
      if (uVar1 != 0) {
        if (iVar2 == 0) {
          piVar3 = (int *)(**(code **)(puVar7 + 0x124b4))();
          uVar1 = -(uint)(*piVar3 != 9);
        }
        else {
          uVar1 = 0xffffffff;
        }
      }
    }
    else if (uVar1 == 0) {
      puVar4 = (undefined4 *)(**(code **)(puVar7 + 0x124b4))();
      *puVar4 = 0;
      uVar1 = 0xffffffff;
    }
    else {
      uVar1 = 0xffffffff;
    }
    return uVar1;
  }
  return uVar1;
}

