
int sh_mbsnlen(char *src,size_t srclen,int maxlen)

{
  byte bVar1;
  int iVar2;
  anon_union_4_2_91654ee9_for___value aVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  int *piVar7;
  int iVar8;
  int *piVar9;
  int iVar10;
  int in_t9;
  code *pcVar11;
  int *piVar12;
  mbstate_t state;
  mbstate_t state_bak;
  
  piVar7 = *(int **)(in_t9 + 0x674f4);
  iVar8 = 0;
  iVar6 = 0;
  state.__count = 0;
  state.__value.__wch = 0;
  iVar4 = *piVar7;
  piVar9 = *(int **)(in_t9 + 0x65b18);
  iVar10 = *(int *)(in_t9 + 0x65b1c);
  piVar12 = *(int **)(in_t9 + 0x65b14);
  do {
    aVar3 = state.__value;
    iVar2 = state.__count;
    bVar1 = src[iVar6];
    if (bVar1 == 0) break;
    iVar8 = iVar8 + 1;
    if (*piVar9 < 2) {
LAB_000df144:
      iVar6 = iVar6 + 1;
    }
    else {
      iVar5 = 1;
      if (((*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&
         ((*piVar12 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {
        iVar5 = (**(code **)(in_t9 + 0x67420))(0,src + iVar6,srclen - iVar6,&state);
        if (iVar5 + 2U < 2) {
          iVar6 = iVar6 + 1;
          state.__count = iVar2;
          state.__value = aVar3;
          goto LAB_000df0b8;
        }
        if (iVar5 == 0) goto LAB_000df144;
      }
      iVar6 = iVar6 + iVar5;
    }
LAB_000df0b8:
  } while (iVar6 <= maxlen);
  if (iVar4 != *piVar7) {
    pcVar11 = *(code **)(in_t9 + 0x674a0);
    (*pcVar11)();
                    /* WARNING: Could not recover jumptable at 0x000df180. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    iVar4 = (**(code **)(pcVar11 + 0x67228))();
    return iVar4;
  }
  return iVar8;
}



int sh_mbsnlen(int param_1,int param_2,int param_3)

{
  byte bVar1;
  undefined *puVar2;
  undefined *puVar3;
  undefined *puVar4;
  int iVar5;
  int iVar6;
  int iVar7;
  undefined *puVar8;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  int local_2c;
  
  puVar4 = PTR___stack_chk_guard_001464dc;
  puVar3 = PTR_is_basic_table_00144b04;
  puVar2 = PTR_locale_mb_cur_max_00144b00;
  puVar8 = PTR_locale_utf8locale_00144afc;
  iVar7 = 0;
  iVar6 = 0;
  local_3c = 0;
  local_38 = 0;
  local_2c = *(int *)PTR___stack_chk_guard_001464dc;
  do {
    bVar1 = *(byte *)(param_1 + iVar6);
    if (bVar1 == 0) break;
    iVar7 = iVar7 + 1;
    if (*(int *)puVar2 < 2) {
LAB_000df144:
      iVar6 = iVar6 + 1;
    }
    else {
      iVar5 = 1;
      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&
         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {
        local_34 = local_3c;
        local_30 = local_38;
        iVar5 = (*(code *)PTR_mbrtowc_00146408)
                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);
        if (iVar5 + 2U < 2) {
          local_3c = local_34;
          iVar6 = iVar6 + 1;
          local_38 = local_30;
          goto LAB_000df0b8;
        }
        if (iVar5 == 0) goto LAB_000df144;
      }
      iVar6 = iVar6 + iVar5;
    }
LAB_000df0b8:
  } while (iVar6 <= param_3);
  if (local_2c != *(int *)puVar4) {
    puVar8 = PTR___stack_chk_fail_00146488;
    (*(code *)PTR___stack_chk_fail_00146488)();
    iVar6 = (**(code **)(puVar8 + 0x67228))();
    return iVar6;
  }
  return iVar7;
}


lui gp,0x7
addiu gp,gp,-0x2aa8
addu gp,gp,t9
addiu sp,sp,-0x58
sw s1,0x34(sp)
sw s2,0x38(sp)
addiu s2,sp,0x1c
lw s1,-0x6064(gp)
sw s8,0x50(sp)
sw s7,0x4c(sp)
sw s6,0x48(sp)
sw s3,0x3c(sp)
or s3,zero,zero
sw s0,0x30(sp)
or s0,zero,zero
sw gp,0x10(sp)
sw s5,0x44(sp)
or s5,a2,zero
sw s4,0x40(sp)
or s4,a0,zero
sw ra,0x54(sp)
sw zero,0x1c(sp)
sw a1,0x5c(sp)
sw zero,0x4(s2)
lw v0,0x0(s1)
lw s6,-0x7a40(gp)
lw s7,-0x7a3c(gp)
lw s8,-0x7a44(gp)
sw v0,0x2c(sp)
addu a1,s4,s0
lb a0,0x0(a1)
beq a0,zero,0x000df0c4
_nop
lw v0,0x0(s6)
slti v0,v0,0x2
bne v0,zero,0x000df144
_addiu s3,s3,0x1
andi a2,a0,0xff
srl v1,a2,0x5
sll v1,v1,0x2
addu v1,s7,v1
lw v0,0x0(v1)
srlv v0,v0,a2
andi v0,v0,0x1
bne v0,zero,0x000df0b4
_li v0,0x1
lw v0,0x0(s8)
beq v0,zero,0x000df108
_lw v0,0x5c(sp)
bltz a0,0x000df104
_li v0,0x1
addu s0,s0,v0
slt v0,s5,s0
beq v0,zero,0x000df05c
_nop
lw a0,0x2c(sp)
or v0,s3,zero
lw v1,0x0(s1)
bne a0,v1,0x000df164
_lw ra,0x54(sp)
lw s8,0x50(sp)
lw s7,0x4c(sp)
lw s6,0x48(sp)
lw s5,0x44(sp)
lw s4,0x40(sp)
lw s3,0x3c(sp)
lw s2,0x38(sp)
lw s1,0x34(sp)
lw s0,0x30(sp)
jr ra
_addiu sp,sp,0x58
lw v0,0x5c(sp)
or a0,zero,zero
lw t9,-0x6138(gp)
or a3,s2,zero
subu a2,v0,s0
lw v0,0x1c(sp)
sw v0,0x24(sp)
lw v0,0x20(sp)
jalr t9
_sw v0,0x28(sp)
addiu v1,v0,0x2
sltiu v1,v1,0x2
bne v1,zero,0x000df14c
_lw gp,0x10(sp)
bne v0,zero,0x000df0b4
_nop
b 0x000df0b8
_addiu s0,s0,0x1
lw v0,0x24(sp)
addiu s0,s0,0x1
sw v0,0x1c(sp)
lw v0,0x28(sp)
b 0x000df0b8
_sw v0,0x20(sp)
lw t9,-0x60b8(gp)
jalr t9
_nop
(translation_unit "int sh_mbsnlen(int param_1,int param_2,int param_3)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  undefined *puVar4;\n  int iVar5;\n  int iVar6;\n  int iVar7;\n  undefined *puVar8;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar4 = PTR___stack_chk_guard_001464dc;\n  puVar3 = PTR_is_basic_table_00144b04;\n  puVar2 = PTR_locale_mb_cur_max_00144b00;\n  puVar8 = PTR_locale_utf8locale_00144afc;\n  iVar7 = 0;\n  iVar6 = 0;\n  local_3c = 0;\n  local_38 = 0;\n  local_2c = *(int *)PTR___stack_chk_guard_001464dc;\n  do {\n    bVar1 = *(byte *)(param_1 + iVar6);\n    if (bVar1 == 0) break;\n    iVar7 = iVar7 + 1;\n    if (*(int *)puVar2 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  } while (iVar6 <= param_3);\n  if (local_2c != *(int *)puVar4) {\n    puVar8 = PTR___stack_chk_fail_00146488;\n    (*(code *)PTR___stack_chk_fail_00146488)();\n    iVar6 = (**(code **)(puVar8 + 0x67228))();\n    return iVar6;\n  }\n  return iVar7;\n}\n\n" (function_definition "int sh_mbsnlen(int param_1,int param_2,int param_3)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  undefined *puVar4;\n  int iVar5;\n  int iVar6;\n  int iVar7;\n  undefined *puVar8;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar4 = PTR___stack_chk_guard_001464dc;\n  puVar3 = PTR_is_basic_table_00144b04;\n  puVar2 = PTR_locale_mb_cur_max_00144b00;\n  puVar8 = PTR_locale_utf8locale_00144afc;\n  iVar7 = 0;\n  iVar6 = 0;\n  local_3c = 0;\n  local_38 = 0;\n  local_2c = *(int *)PTR___stack_chk_guard_001464dc;\n  do {\n    bVar1 = *(byte *)(param_1 + iVar6);\n    if (bVar1 == 0) break;\n    iVar7 = iVar7 + 1;\n    if (*(int *)puVar2 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  } while (iVar6 <= param_3);\n  if (local_2c != *(int *)puVar4) {\n    puVar8 = PTR___stack_chk_fail_00146488;\n    (*(code *)PTR___stack_chk_fail_00146488)();\n    iVar6 = (**(code **)(puVar8 + 0x67228))();\n    return iVar6;\n  }\n  return iVar7;\n}" primitive_type (function_declarator "sh_mbsnlen(int param_1,int param_2,int param_3)" identifier (parameter_list "(int param_1,int param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  undefined *puVar4;\n  int iVar5;\n  int iVar6;\n  int iVar7;\n  undefined *puVar8;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar4 = PTR___stack_chk_guard_001464dc;\n  puVar3 = PTR_is_basic_table_00144b04;\n  puVar2 = PTR_locale_mb_cur_max_00144b00;\n  puVar8 = PTR_locale_utf8locale_00144afc;\n  iVar7 = 0;\n  iVar6 = 0;\n  local_3c = 0;\n  local_38 = 0;\n  local_2c = *(int *)PTR___stack_chk_guard_001464dc;\n  do {\n    bVar1 = *(byte *)(param_1 + iVar6);\n    if (bVar1 == 0) break;\n    iVar7 = iVar7 + 1;\n    if (*(int *)puVar2 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  } while (iVar6 <= param_3);\n  if (local_2c != *(int *)puVar4) {\n    puVar8 = PTR___stack_chk_fail_00146488;\n    (*(code *)PTR___stack_chk_fail_00146488)();\n    iVar6 = (**(code **)(puVar8 + 0x67228))();\n    return iVar6;\n  }\n  return iVar7;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "undefined *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "undefined4 local_3c;" type_identifier identifier ;) (declaration "undefined4 local_38;" type_identifier identifier ;) (declaration "undefined4 local_34;" type_identifier identifier ;) (declaration "undefined4 local_30;" type_identifier identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (expression_statement "puVar4 = PTR___stack_chk_guard_001464dc;" (assignment_expression "puVar4 = PTR___stack_chk_guard_001464dc" identifier = identifier) ;) (expression_statement "puVar3 = PTR_is_basic_table_00144b04;" (assignment_expression "puVar3 = PTR_is_basic_table_00144b04" identifier = identifier) ;) (expression_statement "puVar2 = PTR_locale_mb_cur_max_00144b00;" (assignment_expression "puVar2 = PTR_locale_mb_cur_max_00144b00" identifier = identifier) ;) (expression_statement "puVar8 = PTR_locale_utf8locale_00144afc;" (assignment_expression "puVar8 = PTR_locale_utf8locale_00144afc" identifier = identifier) ;) (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "local_3c = 0;" (assignment_expression "local_3c = 0" identifier = number_literal) ;) (expression_statement "local_38 = 0;" (assignment_expression "local_38 = 0" identifier = number_literal) ;) (expression_statement "local_2c = *(int *)PTR___stack_chk_guard_001464dc;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_001464dc" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_001464dc" * (cast_expression "(int *)PTR___stack_chk_guard_001464dc" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (do_statement "do {\n    bVar1 = *(byte *)(param_1 + iVar6);\n    if (bVar1 == 0) break;\n    iVar7 = iVar7 + 1;\n    if (*(int *)puVar2 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  } while (iVar6 <= param_3);" do (compound_statement "{\n    bVar1 = *(byte *)(param_1 + iVar6);\n    if (bVar1 == 0) break;\n    iVar7 = iVar7 + 1;\n    if (*(int *)puVar2 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  }" { (expression_statement "bVar1 = *(byte *)(param_1 + iVar6);" (assignment_expression "bVar1 = *(byte *)(param_1 + iVar6)" identifier = (pointer_expression "*(byte *)(param_1 + iVar6)" * (cast_expression "(byte *)(param_1 + iVar6)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar6)" ( (binary_expression "param_1 + iVar6" identifier + identifier) ))))) ;) (if_statement "if (bVar1 == 0) break;" if (parenthesized_expression "(bVar1 == 0)" ( (binary_expression "bVar1 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) (if_statement "if (*(int *)puVar2 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }" if (parenthesized_expression "(*(int *)puVar2 < 2)" ( (binary_expression "*(int *)puVar2 < 2" (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) < number_literal) )) (compound_statement "{\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }" { (labeled_statement "LAB_000df144:\n      iVar6 = iVar6 + 1;" statement_identifier : (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;)) }) (else_clause "else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }" else (compound_statement "{\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }" { (expression_statement "iVar5 = 1;" (assignment_expression "iVar5 = 1" identifier = number_literal) ;) (if_statement "if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }" if (parenthesized_expression "(((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0'))))" ( (binary_expression "((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))" (parenthesized_expression "((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0)" ( (binary_expression "(*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0" (parenthesized_expression "(*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1)" ( (binary_expression "*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1" (binary_expression "*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f)" (pointer_expression "*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4)" * (cast_expression "(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + (uint)(bVar1 >> 5) * 4)" ( (binary_expression "puVar3 + (uint)(bVar1 >> 5) * 4" identifier + (binary_expression "(uint)(bVar1 >> 5) * 4" (call_expression "(uint)(bVar1 >> 5)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(bVar1 >> 5)" ( (binary_expression "bVar1 >> 5" identifier >> number_literal) ))) * number_literal)) )))) >> (parenthesized_expression "(bVar1 & 0x1f)" ( (binary_expression "bVar1 & 0x1f" identifier & number_literal) ))) & number_literal) )) == number_literal) )) && (parenthesized_expression "((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))" ( (parenthesized_expression "(*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0'))" ( (binary_expression "*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')" (binary_expression "*(int *)puVar8 == 0" (pointer_expression "*(int *)puVar8" * (cast_expression "(int *)puVar8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) == number_literal) || (parenthesized_expression "(iVar5 = 1, (char)bVar1 < '\0')" ( (comma_expression "iVar5 = 1, (char)bVar1 < '\0'" (assignment_expression "iVar5 = 1" identifier = number_literal) , (binary_expression "(char)bVar1 < '\0'" (cast_expression "(char)bVar1" ( (type_descriptor "char" primitive_type) ) identifier) < (char_literal "'\0'" ' escape_sequence '))) ))) )) ))) )) (compound_statement "{\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }" { (expression_statement "local_34 = local_3c;" (assignment_expression "local_34 = local_3c" identifier = identifier) ;) (expression_statement "local_30 = local_38;" (assignment_expression "local_30 = local_38" identifier = identifier) ;) (expression_statement "iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);" (assignment_expression "iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c)" identifier = (call_expression "(*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c)" (parenthesized_expression "(*(code *)PTR_mbrtowc_00146408)" ( (pointer_expression "*(code *)PTR_mbrtowc_00146408" * (cast_expression "(code *)PTR_mbrtowc_00146408" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c)" ( number_literal , (cast_expression "(byte *)(param_1 + iVar6)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar6)" ( (binary_expression "param_1 + iVar6" identifier + identifier) ))) , (binary_expression "param_2 - iVar6" identifier - identifier) , (pointer_expression "&local_3c" & identifier) )))) ;) (if_statement "if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }" if (parenthesized_expression "(iVar5 + 2U < 2)" ( (binary_expression "iVar5 + 2U < 2" (binary_expression "iVar5 + 2U" identifier + number_literal) < number_literal) )) (compound_statement "{\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }" { (expression_statement "local_3c = local_34;" (assignment_expression "local_3c = local_34" identifier = identifier) ;) (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (expression_statement "local_38 = local_30;" (assignment_expression "local_38 = local_30" identifier = identifier) ;) (goto_statement "goto LAB_000df0b8;" goto statement_identifier ;) })) (if_statement "if (iVar5 == 0) goto LAB_000df144;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (goto_statement "goto LAB_000df144;" goto statement_identifier ;)) })) (expression_statement "iVar6 = iVar6 + iVar5;" (assignment_expression "iVar6 = iVar6 + iVar5" identifier = (binary_expression "iVar6 + iVar5" identifier + identifier)) ;) }))) (labeled_statement "LAB_000df0b8:" statement_identifier : (expression_statement "" ;)) }) while (parenthesized_expression "(iVar6 <= param_3)" ( (binary_expression "iVar6 <= param_3" identifier <= identifier) )) ;) (if_statement "if (local_2c != *(int *)puVar4) {\n    puVar8 = PTR___stack_chk_fail_00146488;\n    (*(code *)PTR___stack_chk_fail_00146488)();\n    iVar6 = (**(code **)(puVar8 + 0x67228))();\n    return iVar6;\n  }" if (parenthesized_expression "(local_2c != *(int *)puVar4)" ( (binary_expression "local_2c != *(int *)puVar4" identifier != (pointer_expression "*(int *)puVar4" * (cast_expression "(int *)puVar4" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    puVar8 = PTR___stack_chk_fail_00146488;\n    (*(code *)PTR___stack_chk_fail_00146488)();\n    iVar6 = (**(code **)(puVar8 + 0x67228))();\n    return iVar6;\n  }" { (expression_statement "puVar8 = PTR___stack_chk_fail_00146488;" (assignment_expression "puVar8 = PTR___stack_chk_fail_00146488" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_00146488)();" (call_expression "(*(code *)PTR___stack_chk_fail_00146488)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00146488)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00146488" * (cast_expression "(code *)PTR___stack_chk_fail_00146488" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar6 = (**(code **)(puVar8 + 0x67228))();" (assignment_expression "iVar6 = (**(code **)(puVar8 + 0x67228))()" identifier = (call_expression "(**(code **)(puVar8 + 0x67228))()" (parenthesized_expression "(**(code **)(puVar8 + 0x67228))" ( (pointer_expression "**(code **)(puVar8 + 0x67228)" * (pointer_expression "*(code **)(puVar8 + 0x67228)" * (cast_expression "(code **)(puVar8 + 0x67228)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar8 + 0x67228)" ( (binary_expression "puVar8 + 0x67228" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return iVar6;" return identifier ;) })) (return_statement "return iVar7;" return identifier ;) })))
(translation_unit "int sh_mbsnlen(char *src,size_t srclen,int maxlen)\n\n{\n  byte bVar1;\n  int iVar2;\n  anon_union_4_2_91654ee9_for___value aVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  int iVar8;\n  int *piVar9;\n  int iVar10;\n  int in_t9;\n  code *pcVar11;\n  int *piVar12;\n  mbstate_t state;\n  mbstate_t state_bak;\n  \n  piVar7 = *(int **)(in_t9 + 0x674f4);\n  iVar8 = 0;\n  iVar6 = 0;\n  state.__count = 0;\n  state.__value.__wch = 0;\n  iVar4 = *piVar7;\n  piVar9 = *(int **)(in_t9 + 0x65b18);\n  iVar10 = *(int *)(in_t9 + 0x65b1c);\n  piVar12 = *(int **)(in_t9 + 0x65b14);\n  do {\n    aVar3 = state.__value;\n    iVar2 = state.__count;\n    bVar1 = src[iVar6];\n    if (bVar1 == 0) break;\n    iVar8 = iVar8 + 1;\n    if (*piVar9 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*piVar12 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        iVar5 = (**(code **)(in_t9 + 0x67420))(0,src + iVar6,srclen - iVar6,&state);\n        if (iVar5 + 2U < 2) {\n          iVar6 = iVar6 + 1;\n          state.__count = iVar2;\n          state.__value = aVar3;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  } while (iVar6 <= maxlen);\n  if (iVar4 != *piVar7) {\n    pcVar11 = *(code **)(in_t9 + 0x674a0);\n    (*pcVar11)();\n                    /* WARNING: Could not recover jumptable at 0x000df180. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    iVar4 = (**(code **)(pcVar11 + 0x67228))();\n    return iVar4;\n  }\n  return iVar8;\n}\n\n" (function_definition "int sh_mbsnlen(char *src,size_t srclen,int maxlen)\n\n{\n  byte bVar1;\n  int iVar2;\n  anon_union_4_2_91654ee9_for___value aVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  int iVar8;\n  int *piVar9;\n  int iVar10;\n  int in_t9;\n  code *pcVar11;\n  int *piVar12;\n  mbstate_t state;\n  mbstate_t state_bak;\n  \n  piVar7 = *(int **)(in_t9 + 0x674f4);\n  iVar8 = 0;\n  iVar6 = 0;\n  state.__count = 0;\n  state.__value.__wch = 0;\n  iVar4 = *piVar7;\n  piVar9 = *(int **)(in_t9 + 0x65b18);\n  iVar10 = *(int *)(in_t9 + 0x65b1c);\n  piVar12 = *(int **)(in_t9 + 0x65b14);\n  do {\n    aVar3 = state.__value;\n    iVar2 = state.__count;\n    bVar1 = src[iVar6];\n    if (bVar1 == 0) break;\n    iVar8 = iVar8 + 1;\n    if (*piVar9 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*piVar12 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        iVar5 = (**(code **)(in_t9 + 0x67420))(0,src + iVar6,srclen - iVar6,&state);\n        if (iVar5 + 2U < 2) {\n          iVar6 = iVar6 + 1;\n          state.__count = iVar2;\n          state.__value = aVar3;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  } while (iVar6 <= maxlen);\n  if (iVar4 != *piVar7) {\n    pcVar11 = *(code **)(in_t9 + 0x674a0);\n    (*pcVar11)();\n                    /* WARNING: Could not recover jumptable at 0x000df180. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    iVar4 = (**(code **)(pcVar11 + 0x67228))();\n    return iVar4;\n  }\n  return iVar8;\n}" primitive_type (function_declarator "sh_mbsnlen(char *src,size_t srclen,int maxlen)" identifier (parameter_list "(char *src,size_t srclen,int maxlen)" ( (parameter_declaration "char *src" primitive_type (pointer_declarator "*src" * identifier)) , (parameter_declaration "size_t srclen" primitive_type identifier) , (parameter_declaration "int maxlen" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  int iVar2;\n  anon_union_4_2_91654ee9_for___value aVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  int *piVar7;\n  int iVar8;\n  int *piVar9;\n  int iVar10;\n  int in_t9;\n  code *pcVar11;\n  int *piVar12;\n  mbstate_t state;\n  mbstate_t state_bak;\n  \n  piVar7 = *(int **)(in_t9 + 0x674f4);\n  iVar8 = 0;\n  iVar6 = 0;\n  state.__count = 0;\n  state.__value.__wch = 0;\n  iVar4 = *piVar7;\n  piVar9 = *(int **)(in_t9 + 0x65b18);\n  iVar10 = *(int *)(in_t9 + 0x65b1c);\n  piVar12 = *(int **)(in_t9 + 0x65b14);\n  do {\n    aVar3 = state.__value;\n    iVar2 = state.__count;\n    bVar1 = src[iVar6];\n    if (bVar1 == 0) break;\n    iVar8 = iVar8 + 1;\n    if (*piVar9 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*piVar12 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        iVar5 = (**(code **)(in_t9 + 0x67420))(0,src + iVar6,srclen - iVar6,&state);\n        if (iVar5 + 2U < 2) {\n          iVar6 = iVar6 + 1;\n          state.__count = iVar2;\n          state.__value = aVar3;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  } while (iVar6 <= maxlen);\n  if (iVar4 != *piVar7) {\n    pcVar11 = *(code **)(in_t9 + 0x674a0);\n    (*pcVar11)();\n                    /* WARNING: Could not recover jumptable at 0x000df180. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    iVar4 = (**(code **)(pcVar11 + 0x67228))();\n    return iVar4;\n  }\n  return iVar8;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "anon_union_4_2_91654ee9_for___value aVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "int *piVar9;" primitive_type (pointer_declarator "*piVar9" * identifier) ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "int in_t9;" primitive_type identifier ;) (declaration "code *pcVar11;" type_identifier (pointer_declarator "*pcVar11" * identifier) ;) (declaration "int *piVar12;" primitive_type (pointer_declarator "*piVar12" * identifier) ;) (declaration "mbstate_t state;" type_identifier identifier ;) (declaration "mbstate_t state_bak;" type_identifier identifier ;) (expression_statement "piVar7 = *(int **)(in_t9 + 0x674f4);" (assignment_expression "piVar7 = *(int **)(in_t9 + 0x674f4)" identifier = (pointer_expression "*(int **)(in_t9 + 0x674f4)" * (cast_expression "(int **)(in_t9 + 0x674f4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(in_t9 + 0x674f4)" ( (binary_expression "in_t9 + 0x674f4" identifier + number_literal) ))))) ;) (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "state.__count = 0;" (assignment_expression "state.__count = 0" (field_expression "state.__count" identifier . field_identifier) = number_literal) ;) (expression_statement "state.__value.__wch = 0;" (assignment_expression "state.__value.__wch = 0" (field_expression "state.__value.__wch" (field_expression "state.__value" identifier . field_identifier) . field_identifier) = number_literal) ;) (expression_statement "iVar4 = *piVar7;" (assignment_expression "iVar4 = *piVar7" identifier = (pointer_expression "*piVar7" * identifier)) ;) (expression_statement "piVar9 = *(int **)(in_t9 + 0x65b18);" (assignment_expression "piVar9 = *(int **)(in_t9 + 0x65b18)" identifier = (pointer_expression "*(int **)(in_t9 + 0x65b18)" * (cast_expression "(int **)(in_t9 + 0x65b18)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(in_t9 + 0x65b18)" ( (binary_expression "in_t9 + 0x65b18" identifier + number_literal) ))))) ;) (expression_statement "iVar10 = *(int *)(in_t9 + 0x65b1c);" (assignment_expression "iVar10 = *(int *)(in_t9 + 0x65b1c)" identifier = (pointer_expression "*(int *)(in_t9 + 0x65b1c)" * (cast_expression "(int *)(in_t9 + 0x65b1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_t9 + 0x65b1c)" ( (binary_expression "in_t9 + 0x65b1c" identifier + number_literal) ))))) ;) (expression_statement "piVar12 = *(int **)(in_t9 + 0x65b14);" (assignment_expression "piVar12 = *(int **)(in_t9 + 0x65b14)" identifier = (pointer_expression "*(int **)(in_t9 + 0x65b14)" * (cast_expression "(int **)(in_t9 + 0x65b14)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(in_t9 + 0x65b14)" ( (binary_expression "in_t9 + 0x65b14" identifier + number_literal) ))))) ;) (do_statement "do {\n    aVar3 = state.__value;\n    iVar2 = state.__count;\n    bVar1 = src[iVar6];\n    if (bVar1 == 0) break;\n    iVar8 = iVar8 + 1;\n    if (*piVar9 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*piVar12 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        iVar5 = (**(code **)(in_t9 + 0x67420))(0,src + iVar6,srclen - iVar6,&state);\n        if (iVar5 + 2U < 2) {\n          iVar6 = iVar6 + 1;\n          state.__count = iVar2;\n          state.__value = aVar3;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  } while (iVar6 <= maxlen);" do (compound_statement "{\n    aVar3 = state.__value;\n    iVar2 = state.__count;\n    bVar1 = src[iVar6];\n    if (bVar1 == 0) break;\n    iVar8 = iVar8 + 1;\n    if (*piVar9 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*piVar12 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        iVar5 = (**(code **)(in_t9 + 0x67420))(0,src + iVar6,srclen - iVar6,&state);\n        if (iVar5 + 2U < 2) {\n          iVar6 = iVar6 + 1;\n          state.__count = iVar2;\n          state.__value = aVar3;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  }" { (expression_statement "aVar3 = state.__value;" (assignment_expression "aVar3 = state.__value" identifier = (field_expression "state.__value" identifier . field_identifier)) ;) (expression_statement "iVar2 = state.__count;" (assignment_expression "iVar2 = state.__count" identifier = (field_expression "state.__count" identifier . field_identifier)) ;) (expression_statement "bVar1 = src[iVar6];" (assignment_expression "bVar1 = src[iVar6]" identifier = (subscript_expression "src[iVar6]" identifier [ identifier ])) ;) (if_statement "if (bVar1 == 0) break;" if (parenthesized_expression "(bVar1 == 0)" ( (binary_expression "bVar1 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" identifier = (binary_expression "iVar8 + 1" identifier + number_literal)) ;) (if_statement "if (*piVar9 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*piVar12 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        iVar5 = (**(code **)(in_t9 + 0x67420))(0,src + iVar6,srclen - iVar6,&state);\n        if (iVar5 + 2U < 2) {\n          iVar6 = iVar6 + 1;\n          state.__count = iVar2;\n          state.__value = aVar3;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }" if (parenthesized_expression "(*piVar9 < 2)" ( (binary_expression "*piVar9 < 2" (pointer_expression "*piVar9" * identifier) < number_literal) )) (compound_statement "{\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }" { (labeled_statement "LAB_000df144:\n      iVar6 = iVar6 + 1;" statement_identifier : (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;)) }) (else_clause "else {\n      iVar5 = 1;\n      if (((*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*piVar12 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        iVar5 = (**(code **)(in_t9 + 0x67420))(0,src + iVar6,srclen - iVar6,&state);\n        if (iVar5 + 2U < 2) {\n          iVar6 = iVar6 + 1;\n          state.__count = iVar2;\n          state.__value = aVar3;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }" else (compound_statement "{\n      iVar5 = 1;\n      if (((*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*piVar12 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        iVar5 = (**(code **)(in_t9 + 0x67420))(0,src + iVar6,srclen - iVar6,&state);\n        if (iVar5 + 2U < 2) {\n          iVar6 = iVar6 + 1;\n          state.__count = iVar2;\n          state.__value = aVar3;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }" { (expression_statement "iVar5 = 1;" (assignment_expression "iVar5 = 1" identifier = number_literal) ;) (if_statement "if (((*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*piVar12 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        iVar5 = (**(code **)(in_t9 + 0x67420))(0,src + iVar6,srclen - iVar6,&state);\n        if (iVar5 + 2U < 2) {\n          iVar6 = iVar6 + 1;\n          state.__count = iVar2;\n          state.__value = aVar3;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }" if (parenthesized_expression "(((*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*piVar12 == 0 || (iVar5 = 1, (char)bVar1 < '\0'))))" ( (binary_expression "((*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*piVar12 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))" (parenthesized_expression "((*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0)" ( (binary_expression "(*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0" (parenthesized_expression "(*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1)" ( (binary_expression "*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1" (binary_expression "*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f)" (pointer_expression "*(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4)" * (cast_expression "(uint *)(iVar10 + (uint)(bVar1 >> 5) * 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar10 + (uint)(bVar1 >> 5) * 4)" ( (binary_expression "iVar10 + (uint)(bVar1 >> 5) * 4" identifier + (binary_expression "(uint)(bVar1 >> 5) * 4" (call_expression "(uint)(bVar1 >> 5)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(bVar1 >> 5)" ( (binary_expression "bVar1 >> 5" identifier >> number_literal) ))) * number_literal)) )))) >> (parenthesized_expression "(bVar1 & 0x1f)" ( (binary_expression "bVar1 & 0x1f" identifier & number_literal) ))) & number_literal) )) == number_literal) )) && (parenthesized_expression "((*piVar12 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))" ( (parenthesized_expression "(*piVar12 == 0 || (iVar5 = 1, (char)bVar1 < '\0'))" ( (binary_expression "*piVar12 == 0 || (iVar5 = 1, (char)bVar1 < '\0')" (binary_expression "*piVar12 == 0" (pointer_expression "*piVar12" * identifier) == number_literal) || (parenthesized_expression "(iVar5 = 1, (char)bVar1 < '\0')" ( (comma_expression "iVar5 = 1, (char)bVar1 < '\0'" (assignment_expression "iVar5 = 1" identifier = number_literal) , (binary_expression "(char)bVar1 < '\0'" (cast_expression "(char)bVar1" ( (type_descriptor "char" primitive_type) ) identifier) < (char_literal "'\0'" ' escape_sequence '))) ))) )) ))) )) (compound_statement "{\n        iVar5 = (**(code **)(in_t9 + 0x67420))(0,src + iVar6,srclen - iVar6,&state);\n        if (iVar5 + 2U < 2) {\n          iVar6 = iVar6 + 1;\n          state.__count = iVar2;\n          state.__value = aVar3;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }" { (expression_statement "iVar5 = (**(code **)(in_t9 + 0x67420))(0,src + iVar6,srclen - iVar6,&state);" (assignment_expression "iVar5 = (**(code **)(in_t9 + 0x67420))(0,src + iVar6,srclen - iVar6,&state)" identifier = (call_expression "(**(code **)(in_t9 + 0x67420))(0,src + iVar6,srclen - iVar6,&state)" (parenthesized_expression "(**(code **)(in_t9 + 0x67420))" ( (pointer_expression "**(code **)(in_t9 + 0x67420)" * (pointer_expression "*(code **)(in_t9 + 0x67420)" * (cast_expression "(code **)(in_t9 + 0x67420)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(in_t9 + 0x67420)" ( (binary_expression "in_t9 + 0x67420" identifier + number_literal) ))))) )) (argument_list "(0,src + iVar6,srclen - iVar6,&state)" ( number_literal , (binary_expression "src + iVar6" identifier + identifier) , (binary_expression "srclen - iVar6" identifier - identifier) , (pointer_expression "&state" & identifier) )))) ;) (if_statement "if (iVar5 + 2U < 2) {\n          iVar6 = iVar6 + 1;\n          state.__count = iVar2;\n          state.__value = aVar3;\n          goto LAB_000df0b8;\n        }" if (parenthesized_expression "(iVar5 + 2U < 2)" ( (binary_expression "iVar5 + 2U < 2" (binary_expression "iVar5 + 2U" identifier + number_literal) < number_literal) )) (compound_statement "{\n          iVar6 = iVar6 + 1;\n          state.__count = iVar2;\n          state.__value = aVar3;\n          goto LAB_000df0b8;\n        }" { (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (expression_statement "state.__count = iVar2;" (assignment_expression "state.__count = iVar2" (field_expression "state.__count" identifier . field_identifier) = identifier) ;) (expression_statement "state.__value = aVar3;" (assignment_expression "state.__value = aVar3" (field_expression "state.__value" identifier . field_identifier) = identifier) ;) (goto_statement "goto LAB_000df0b8;" goto statement_identifier ;) })) (if_statement "if (iVar5 == 0) goto LAB_000df144;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (goto_statement "goto LAB_000df144;" goto statement_identifier ;)) })) (expression_statement "iVar6 = iVar6 + iVar5;" (assignment_expression "iVar6 = iVar6 + iVar5" identifier = (binary_expression "iVar6 + iVar5" identifier + identifier)) ;) }))) (labeled_statement "LAB_000df0b8:" statement_identifier : (expression_statement "" ;)) }) while (parenthesized_expression "(iVar6 <= maxlen)" ( (binary_expression "iVar6 <= maxlen" identifier <= identifier) )) ;) (if_statement "if (iVar4 != *piVar7) {\n    pcVar11 = *(code **)(in_t9 + 0x674a0);\n    (*pcVar11)();\n                    /* WARNING: Could not recover jumptable at 0x000df180. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    iVar4 = (**(code **)(pcVar11 + 0x67228))();\n    return iVar4;\n  }" if (parenthesized_expression "(iVar4 != *piVar7)" ( (binary_expression "iVar4 != *piVar7" identifier != (pointer_expression "*piVar7" * identifier)) )) (compound_statement "{\n    pcVar11 = *(code **)(in_t9 + 0x674a0);\n    (*pcVar11)();\n                    /* WARNING: Could not recover jumptable at 0x000df180. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    iVar4 = (**(code **)(pcVar11 + 0x67228))();\n    return iVar4;\n  }" { (expression_statement "pcVar11 = *(code **)(in_t9 + 0x674a0);" (assignment_expression "pcVar11 = *(code **)(in_t9 + 0x674a0)" identifier = (pointer_expression "*(code **)(in_t9 + 0x674a0)" * (cast_expression "(code **)(in_t9 + 0x674a0)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(in_t9 + 0x674a0)" ( (binary_expression "in_t9 + 0x674a0" identifier + number_literal) ))))) ;) (expression_statement "(*pcVar11)();" (call_expression "(*pcVar11)()" (parenthesized_expression "(*pcVar11)" ( (pointer_expression "*pcVar11" * identifier) )) (argument_list "()" ( ))) ;) comment comment (expression_statement "iVar4 = (**(code **)(pcVar11 + 0x67228))();" (assignment_expression "iVar4 = (**(code **)(pcVar11 + 0x67228))()" identifier = (call_expression "(**(code **)(pcVar11 + 0x67228))()" (parenthesized_expression "(**(code **)(pcVar11 + 0x67228))" ( (pointer_expression "**(code **)(pcVar11 + 0x67228)" * (pointer_expression "*(code **)(pcVar11 + 0x67228)" * (cast_expression "(code **)(pcVar11 + 0x67228)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(pcVar11 + 0x67228)" ( (binary_expression "pcVar11 + 0x67228" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return iVar4;" return identifier ;) })) (return_statement "return iVar8;" return identifier ;) })))
(translation_unit "int sh_mbsnlen(int param_1,int param_2,int param_3)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  undefined *puVar4;\n  int iVar5;\n  int iVar6;\n  int iVar7;\n  undefined *puVar8;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar4 = PTR___stack_chk_guard_001464dc;\n  puVar3 = PTR_is_basic_table_00144b04;\n  puVar2 = PTR_locale_mb_cur_max_00144b00;\n  puVar8 = PTR_locale_utf8locale_00144afc;\n  iVar7 = 0;\n  iVar6 = 0;\n  local_3c = 0;\n  local_38 = 0;\n  local_2c = *(int *)PTR___stack_chk_guard_001464dc;\n  do {\n    bVar1 = *(byte *)(param_1 + iVar6);\n    if (bVar1 == 0) break;\n    iVar7 = iVar7 + 1;\n    if (*(int *)puVar2 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  } while (iVar6 <= param_3);\n  if (local_2c != *(int *)puVar4) {\n    puVar8 = PTR___stack_chk_fail_00146488;\n    (*(code *)PTR___stack_chk_fail_00146488)();\n    iVar6 = (**(code **)(puVar8 + 0x67228))();\n    return iVar6;\n  }\n  return iVar7;\n}\n\n" (function_definition "int sh_mbsnlen(int param_1,int param_2,int param_3)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  undefined *puVar4;\n  int iVar5;\n  int iVar6;\n  int iVar7;\n  undefined *puVar8;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar4 = PTR___stack_chk_guard_001464dc;\n  puVar3 = PTR_is_basic_table_00144b04;\n  puVar2 = PTR_locale_mb_cur_max_00144b00;\n  puVar8 = PTR_locale_utf8locale_00144afc;\n  iVar7 = 0;\n  iVar6 = 0;\n  local_3c = 0;\n  local_38 = 0;\n  local_2c = *(int *)PTR___stack_chk_guard_001464dc;\n  do {\n    bVar1 = *(byte *)(param_1 + iVar6);\n    if (bVar1 == 0) break;\n    iVar7 = iVar7 + 1;\n    if (*(int *)puVar2 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  } while (iVar6 <= param_3);\n  if (local_2c != *(int *)puVar4) {\n    puVar8 = PTR___stack_chk_fail_00146488;\n    (*(code *)PTR___stack_chk_fail_00146488)();\n    iVar6 = (**(code **)(puVar8 + 0x67228))();\n    return iVar6;\n  }\n  return iVar7;\n}" primitive_type (function_declarator "sh_mbsnlen(int param_1,int param_2,int param_3)" identifier (parameter_list "(int param_1,int param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  undefined *puVar4;\n  int iVar5;\n  int iVar6;\n  int iVar7;\n  undefined *puVar8;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar4 = PTR___stack_chk_guard_001464dc;\n  puVar3 = PTR_is_basic_table_00144b04;\n  puVar2 = PTR_locale_mb_cur_max_00144b00;\n  puVar8 = PTR_locale_utf8locale_00144afc;\n  iVar7 = 0;\n  iVar6 = 0;\n  local_3c = 0;\n  local_38 = 0;\n  local_2c = *(int *)PTR___stack_chk_guard_001464dc;\n  do {\n    bVar1 = *(byte *)(param_1 + iVar6);\n    if (bVar1 == 0) break;\n    iVar7 = iVar7 + 1;\n    if (*(int *)puVar2 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  } while (iVar6 <= param_3);\n  if (local_2c != *(int *)puVar4) {\n    puVar8 = PTR___stack_chk_fail_00146488;\n    (*(code *)PTR___stack_chk_fail_00146488)();\n    iVar6 = (**(code **)(puVar8 + 0x67228))();\n    return iVar6;\n  }\n  return iVar7;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "undefined *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "undefined4 local_3c;" type_identifier identifier ;) (declaration "undefined4 local_38;" type_identifier identifier ;) (declaration "undefined4 local_34;" type_identifier identifier ;) (declaration "undefined4 local_30;" type_identifier identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (expression_statement "puVar4 = PTR___stack_chk_guard_001464dc;" (assignment_expression "puVar4 = PTR___stack_chk_guard_001464dc" identifier = identifier) ;) (expression_statement "puVar3 = PTR_is_basic_table_00144b04;" (assignment_expression "puVar3 = PTR_is_basic_table_00144b04" identifier = identifier) ;) (expression_statement "puVar2 = PTR_locale_mb_cur_max_00144b00;" (assignment_expression "puVar2 = PTR_locale_mb_cur_max_00144b00" identifier = identifier) ;) (expression_statement "puVar8 = PTR_locale_utf8locale_00144afc;" (assignment_expression "puVar8 = PTR_locale_utf8locale_00144afc" identifier = identifier) ;) (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "local_3c = 0;" (assignment_expression "local_3c = 0" identifier = number_literal) ;) (expression_statement "local_38 = 0;" (assignment_expression "local_38 = 0" identifier = number_literal) ;) (expression_statement "local_2c = *(int *)PTR___stack_chk_guard_001464dc;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_001464dc" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_001464dc" * (cast_expression "(int *)PTR___stack_chk_guard_001464dc" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (do_statement "do {\n    bVar1 = *(byte *)(param_1 + iVar6);\n    if (bVar1 == 0) break;\n    iVar7 = iVar7 + 1;\n    if (*(int *)puVar2 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  } while (iVar6 <= param_3);" do (compound_statement "{\n    bVar1 = *(byte *)(param_1 + iVar6);\n    if (bVar1 == 0) break;\n    iVar7 = iVar7 + 1;\n    if (*(int *)puVar2 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  }" { (expression_statement "bVar1 = *(byte *)(param_1 + iVar6);" (assignment_expression "bVar1 = *(byte *)(param_1 + iVar6)" identifier = (pointer_expression "*(byte *)(param_1 + iVar6)" * (cast_expression "(byte *)(param_1 + iVar6)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar6)" ( (binary_expression "param_1 + iVar6" identifier + identifier) ))))) ;) (if_statement "if (bVar1 == 0) break;" if (parenthesized_expression "(bVar1 == 0)" ( (binary_expression "bVar1 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) (if_statement "if (*(int *)puVar2 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }" if (parenthesized_expression "(*(int *)puVar2 < 2)" ( (binary_expression "*(int *)puVar2 < 2" (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) < number_literal) )) (compound_statement "{\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }" { (labeled_statement "LAB_000df144:\n      iVar6 = iVar6 + 1;" statement_identifier : (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;)) }) (else_clause "else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }" else (compound_statement "{\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }" { (expression_statement "iVar5 = 1;" (assignment_expression "iVar5 = 1" identifier = number_literal) ;) (if_statement "if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }" if (parenthesized_expression "(((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0'))))" ( (binary_expression "((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))" (parenthesized_expression "((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0)" ( (binary_expression "(*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0" (parenthesized_expression "(*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1)" ( (binary_expression "*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1" (binary_expression "*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f)" (pointer_expression "*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4)" * (cast_expression "(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + (uint)(bVar1 >> 5) * 4)" ( (binary_expression "puVar3 + (uint)(bVar1 >> 5) * 4" identifier + (binary_expression "(uint)(bVar1 >> 5) * 4" (call_expression "(uint)(bVar1 >> 5)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(bVar1 >> 5)" ( (binary_expression "bVar1 >> 5" identifier >> number_literal) ))) * number_literal)) )))) >> (parenthesized_expression "(bVar1 & 0x1f)" ( (binary_expression "bVar1 & 0x1f" identifier & number_literal) ))) & number_literal) )) == number_literal) )) && (parenthesized_expression "((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))" ( (parenthesized_expression "(*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0'))" ( (binary_expression "*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')" (binary_expression "*(int *)puVar8 == 0" (pointer_expression "*(int *)puVar8" * (cast_expression "(int *)puVar8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) == number_literal) || (parenthesized_expression "(iVar5 = 1, (char)bVar1 < '\0')" ( (comma_expression "iVar5 = 1, (char)bVar1 < '\0'" (assignment_expression "iVar5 = 1" identifier = number_literal) , (binary_expression "(char)bVar1 < '\0'" (cast_expression "(char)bVar1" ( (type_descriptor "char" primitive_type) ) identifier) < (char_literal "'\0'" ' escape_sequence '))) ))) )) ))) )) (compound_statement "{\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }" { (expression_statement "local_34 = local_3c;" (assignment_expression "local_34 = local_3c" identifier = identifier) ;) (expression_statement "local_30 = local_38;" (assignment_expression "local_30 = local_38" identifier = identifier) ;) (expression_statement "iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);" (assignment_expression "iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c)" identifier = (call_expression "(*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c)" (parenthesized_expression "(*(code *)PTR_mbrtowc_00146408)" ( (pointer_expression "*(code *)PTR_mbrtowc_00146408" * (cast_expression "(code *)PTR_mbrtowc_00146408" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c)" ( number_literal , (cast_expression "(byte *)(param_1 + iVar6)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar6)" ( (binary_expression "param_1 + iVar6" identifier + identifier) ))) , (binary_expression "param_2 - iVar6" identifier - identifier) , (pointer_expression "&local_3c" & identifier) )))) ;) (if_statement "if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }" if (parenthesized_expression "(iVar5 + 2U < 2)" ( (binary_expression "iVar5 + 2U < 2" (binary_expression "iVar5 + 2U" identifier + number_literal) < number_literal) )) (compound_statement "{\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }" { (expression_statement "local_3c = local_34;" (assignment_expression "local_3c = local_34" identifier = identifier) ;) (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (expression_statement "local_38 = local_30;" (assignment_expression "local_38 = local_30" identifier = identifier) ;) (goto_statement "goto LAB_000df0b8;" goto statement_identifier ;) })) (if_statement "if (iVar5 == 0) goto LAB_000df144;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (goto_statement "goto LAB_000df144;" goto statement_identifier ;)) })) (expression_statement "iVar6 = iVar6 + iVar5;" (assignment_expression "iVar6 = iVar6 + iVar5" identifier = (binary_expression "iVar6 + iVar5" identifier + identifier)) ;) }))) (labeled_statement "LAB_000df0b8:" statement_identifier : (expression_statement "" ;)) }) while (parenthesized_expression "(iVar6 <= param_3)" ( (binary_expression "iVar6 <= param_3" identifier <= identifier) )) ;) (if_statement "if (local_2c != *(int *)puVar4) {\n    puVar8 = PTR___stack_chk_fail_00146488;\n    (*(code *)PTR___stack_chk_fail_00146488)();\n    iVar6 = (**(code **)(puVar8 + 0x67228))();\n    return iVar6;\n  }" if (parenthesized_expression "(local_2c != *(int *)puVar4)" ( (binary_expression "local_2c != *(int *)puVar4" identifier != (pointer_expression "*(int *)puVar4" * (cast_expression "(int *)puVar4" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    puVar8 = PTR___stack_chk_fail_00146488;\n    (*(code *)PTR___stack_chk_fail_00146488)();\n    iVar6 = (**(code **)(puVar8 + 0x67228))();\n    return iVar6;\n  }" { (expression_statement "puVar8 = PTR___stack_chk_fail_00146488;" (assignment_expression "puVar8 = PTR___stack_chk_fail_00146488" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_00146488)();" (call_expression "(*(code *)PTR___stack_chk_fail_00146488)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00146488)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00146488" * (cast_expression "(code *)PTR___stack_chk_fail_00146488" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar6 = (**(code **)(puVar8 + 0x67228))();" (assignment_expression "iVar6 = (**(code **)(puVar8 + 0x67228))()" identifier = (call_expression "(**(code **)(puVar8 + 0x67228))()" (parenthesized_expression "(**(code **)(puVar8 + 0x67228))" ( (pointer_expression "**(code **)(puVar8 + 0x67228)" * (pointer_expression "*(code **)(puVar8 + 0x67228)" * (cast_expression "(code **)(puVar8 + 0x67228)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar8 + 0x67228)" ( (binary_expression "puVar8 + 0x67228" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return iVar6;" return identifier ;) })) (return_statement "return iVar7;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) < LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT >> LIT) ))) * LIT)) )))) >> (parenthesized_expression ( (binary_expression IDENT & LIT) ))) & LIT) )) == LIT) )) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) == LIT) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = LIT) , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < (char_literal ' escape_sequence '))) ))) )) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))) , (binary_expression IDENT - IDENT) , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) }))) (labeled_statement statement_identifier : (expression_statement ;)) }) while (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) (compound_statement { (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 ( )))) ;) (return_statement return IDENT ;) })) (return_statement return IDENT ;) })))
(function_definition "int sh_mbsnlen(int param_1,int param_2,int param_3)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  undefined *puVar4;\n  int iVar5;\n  int iVar6;\n  int iVar7;\n  undefined *puVar8;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar4 = PTR___stack_chk_guard_001464dc;\n  puVar3 = PTR_is_basic_table_00144b04;\n  puVar2 = PTR_locale_mb_cur_max_00144b00;\n  puVar8 = PTR_locale_utf8locale_00144afc;\n  iVar7 = 0;\n  iVar6 = 0;\n  local_3c = 0;\n  local_38 = 0;\n  local_2c = *(int *)PTR___stack_chk_guard_001464dc;\n  do {\n    bVar1 = *(byte *)(param_1 + iVar6);\n    if (bVar1 == 0) break;\n    iVar7 = iVar7 + 1;\n    if (*(int *)puVar2 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  } while (iVar6 <= param_3);\n  if (local_2c != *(int *)puVar4) {\n    puVar8 = PTR___stack_chk_fail_00146488;\n    (*(code *)PTR___stack_chk_fail_00146488)();\n    iVar6 = (**(code **)(puVar8 + 0x67228))();\n    return iVar6;\n  }\n  return iVar7;\n}" (primitive_type "int") (function_declarator "sh_mbsnlen(int param_1,int param_2,int param_3)" (identifier "sh_mbsnlen") (parameter_list "(int param_1,int param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  byte bVar1;\n  undefined *puVar2;\n  undefined *puVar3;\n  undefined *puVar4;\n  int iVar5;\n  int iVar6;\n  int iVar7;\n  undefined *puVar8;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar4 = PTR___stack_chk_guard_001464dc;\n  puVar3 = PTR_is_basic_table_00144b04;\n  puVar2 = PTR_locale_mb_cur_max_00144b00;\n  puVar8 = PTR_locale_utf8locale_00144afc;\n  iVar7 = 0;\n  iVar6 = 0;\n  local_3c = 0;\n  local_38 = 0;\n  local_2c = *(int *)PTR___stack_chk_guard_001464dc;\n  do {\n    bVar1 = *(byte *)(param_1 + iVar6);\n    if (bVar1 == 0) break;\n    iVar7 = iVar7 + 1;\n    if (*(int *)puVar2 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  } while (iVar6 <= param_3);\n  if (local_2c != *(int *)puVar4) {\n    puVar8 = PTR___stack_chk_fail_00146488;\n    (*(code *)PTR___stack_chk_fail_00146488)();\n    iVar6 = (**(code **)(puVar8 + 0x67228))();\n    return iVar6;\n  }\n  return iVar7;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "undefined *puVar2;" (type_identifier "undefined") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined *puVar3;" (type_identifier "undefined") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "undefined *puVar4;" (type_identifier "undefined") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "undefined *puVar8;" (type_identifier "undefined") (pointer_declarator "*puVar8" (* "*") (identifier "puVar8")) (; ";")) (declaration "undefined4 local_3c;" (type_identifier "undefined4") (identifier "local_3c") (; ";")) (declaration "undefined4 local_38;" (type_identifier "undefined4") (identifier "local_38") (; ";")) (declaration "undefined4 local_34;" (type_identifier "undefined4") (identifier "local_34") (; ";")) (declaration "undefined4 local_30;" (type_identifier "undefined4") (identifier "local_30") (; ";")) (declaration "int local_2c;" (primitive_type "int") (identifier "local_2c") (; ";")) (expression_statement "puVar4 = PTR___stack_chk_guard_001464dc;" (assignment_expression "puVar4 = PTR___stack_chk_guard_001464dc" (identifier "puVar4") (= "=") (identifier "PTR___stack_chk_guard_001464dc")) (; ";")) (expression_statement "puVar3 = PTR_is_basic_table_00144b04;" (assignment_expression "puVar3 = PTR_is_basic_table_00144b04" (identifier "puVar3") (= "=") (identifier "PTR_is_basic_table_00144b04")) (; ";")) (expression_statement "puVar2 = PTR_locale_mb_cur_max_00144b00;" (assignment_expression "puVar2 = PTR_locale_mb_cur_max_00144b00" (identifier "puVar2") (= "=") (identifier "PTR_locale_mb_cur_max_00144b00")) (; ";")) (expression_statement "puVar8 = PTR_locale_utf8locale_00144afc;" (assignment_expression "puVar8 = PTR_locale_utf8locale_00144afc" (identifier "puVar8") (= "=") (identifier "PTR_locale_utf8locale_00144afc")) (; ";")) (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" (identifier "iVar7") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" (identifier "iVar6") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_3c = 0;" (assignment_expression "local_3c = 0" (identifier "local_3c") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_38 = 0;" (assignment_expression "local_38 = 0" (identifier "local_38") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_2c = *(int *)PTR___stack_chk_guard_001464dc;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_001464dc" (identifier "local_2c") (= "=") (pointer_expression "*(int *)PTR___stack_chk_guard_001464dc" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_001464dc" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_001464dc")))) (; ";")) (do_statement "do {\n    bVar1 = *(byte *)(param_1 + iVar6);\n    if (bVar1 == 0) break;\n    iVar7 = iVar7 + 1;\n    if (*(int *)puVar2 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  } while (iVar6 <= param_3);" (do "do") (compound_statement "{\n    bVar1 = *(byte *)(param_1 + iVar6);\n    if (bVar1 == 0) break;\n    iVar7 = iVar7 + 1;\n    if (*(int *)puVar2 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }\nLAB_000df0b8:\n  }" ({ "{") (expression_statement "bVar1 = *(byte *)(param_1 + iVar6);" (assignment_expression "bVar1 = *(byte *)(param_1 + iVar6)" (identifier "bVar1") (= "=") (pointer_expression "*(byte *)(param_1 + iVar6)" (* "*") (cast_expression "(byte *)(param_1 + iVar6)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + iVar6)" (( "(") (binary_expression "param_1 + iVar6" (identifier "param_1") (+ "+") (identifier "iVar6")) () ")"))))) (; ";")) (if_statement "if (bVar1 == 0) break;" (if "if") (parenthesized_expression "(bVar1 == 0)" (( "(") (binary_expression "bVar1 == 0" (identifier "bVar1") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" (identifier "iVar7") (= "=") (binary_expression "iVar7 + 1" (identifier "iVar7") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (*(int *)puVar2 < 2) {\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }\n    else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }" (if "if") (parenthesized_expression "(*(int *)puVar2 < 2)" (( "(") (binary_expression "*(int *)puVar2 < 2" (pointer_expression "*(int *)puVar2" (* "*") (cast_expression "(int *)puVar2" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar2"))) (< "<") (number_literal "2")) () ")")) (compound_statement "{\nLAB_000df144:\n      iVar6 = iVar6 + 1;\n    }" ({ "{") (labeled_statement "LAB_000df144:\n      iVar6 = iVar6 + 1;" (statement_identifier "LAB_000df144") (: ":") (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" (identifier "iVar6") (= "=") (binary_expression "iVar6 + 1" (identifier "iVar6") (+ "+") (number_literal "1"))) (; ";"))) (} "}")) (else_clause "else {\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }" (else "else") (compound_statement "{\n      iVar5 = 1;\n      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }\n      iVar6 = iVar6 + iVar5;\n    }" ({ "{") (expression_statement "iVar5 = 1;" (assignment_expression "iVar5 = 1" (identifier "iVar5") (= "=") (number_literal "1")) (; ";")) (if_statement "if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }" (if "if") (parenthesized_expression "(((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0'))))" (( "(") (binary_expression "((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&\n         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))" (parenthesized_expression "((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0)" (( "(") (binary_expression "(*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0" (parenthesized_expression "(*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1)" (( "(") (binary_expression "*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1" (binary_expression "*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f)" (pointer_expression "*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4)" (* "*") (cast_expression "(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar3 + (uint)(bVar1 >> 5) * 4)" (( "(") (binary_expression "puVar3 + (uint)(bVar1 >> 5) * 4" (identifier "puVar3") (+ "+") (binary_expression "(uint)(bVar1 >> 5) * 4" (call_expression "(uint)(bVar1 >> 5)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(bVar1 >> 5)" (( "(") (binary_expression "bVar1 >> 5" (identifier "bVar1") (>> ">>") (number_literal "5")) () ")"))) (* "*") (number_literal "4"))) () ")")))) (>> ">>") (parenthesized_expression "(bVar1 & 0x1f)" (( "(") (binary_expression "bVar1 & 0x1f" (identifier "bVar1") (& "&") (number_literal "0x1f")) () ")"))) (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))" (( "(") (parenthesized_expression "(*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0'))" (( "(") (binary_expression "*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')" (binary_expression "*(int *)puVar8 == 0" (pointer_expression "*(int *)puVar8" (* "*") (cast_expression "(int *)puVar8" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar8"))) (== "==") (number_literal "0")) (|| "||") (parenthesized_expression "(iVar5 = 1, (char)bVar1 < '\0')" (( "(") (comma_expression "iVar5 = 1, (char)bVar1 < '\0'" (assignment_expression "iVar5 = 1" (identifier "iVar5") (= "=") (number_literal "1")) (, ",") (binary_expression "(char)bVar1 < '\0'" (cast_expression "(char)bVar1" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "bVar1")) (< "<") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'")))) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n        local_34 = local_3c;\n        local_30 = local_38;\n        iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);\n        if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }\n        if (iVar5 == 0) goto LAB_000df144;\n      }" ({ "{") (expression_statement "local_34 = local_3c;" (assignment_expression "local_34 = local_3c" (identifier "local_34") (= "=") (identifier "local_3c")) (; ";")) (expression_statement "local_30 = local_38;" (assignment_expression "local_30 = local_38" (identifier "local_30") (= "=") (identifier "local_38")) (; ";")) (expression_statement "iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);" (assignment_expression "iVar5 = (*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c)" (identifier "iVar5") (= "=") (call_expression "(*(code *)PTR_mbrtowc_00146408)\n                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c)" (parenthesized_expression "(*(code *)PTR_mbrtowc_00146408)" (( "(") (pointer_expression "*(code *)PTR_mbrtowc_00146408" (* "*") (cast_expression "(code *)PTR_mbrtowc_00146408" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_mbrtowc_00146408"))) () ")")) (argument_list "(0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c)" (( "(") (number_literal "0") (, ",") (cast_expression "(byte *)(param_1 + iVar6)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + iVar6)" (( "(") (binary_expression "param_1 + iVar6" (identifier "param_1") (+ "+") (identifier "iVar6")) () ")"))) (, ",") (binary_expression "param_2 - iVar6" (identifier "param_2") (- "-") (identifier "iVar6")) (, ",") (pointer_expression "&local_3c" (& "&") (identifier "local_3c")) () ")")))) (; ";")) (if_statement "if (iVar5 + 2U < 2) {\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }" (if "if") (parenthesized_expression "(iVar5 + 2U < 2)" (( "(") (binary_expression "iVar5 + 2U < 2" (binary_expression "iVar5 + 2U" (identifier "iVar5") (+ "+") (number_literal "2U")) (< "<") (number_literal "2")) () ")")) (compound_statement "{\n          local_3c = local_34;\n          iVar6 = iVar6 + 1;\n          local_38 = local_30;\n          goto LAB_000df0b8;\n        }" ({ "{") (expression_statement "local_3c = local_34;" (assignment_expression "local_3c = local_34" (identifier "local_3c") (= "=") (identifier "local_34")) (; ";")) (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" (identifier "iVar6") (= "=") (binary_expression "iVar6 + 1" (identifier "iVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "local_38 = local_30;" (assignment_expression "local_38 = local_30" (identifier "local_38") (= "=") (identifier "local_30")) (; ";")) (goto_statement "goto LAB_000df0b8;" (goto "goto") (statement_identifier "LAB_000df0b8") (; ";")) (} "}"))) (if_statement "if (iVar5 == 0) goto LAB_000df144;" (if "if") (parenthesized_expression "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_000df144;" (goto "goto") (statement_identifier "LAB_000df144") (; ";"))) (} "}"))) (expression_statement "iVar6 = iVar6 + iVar5;" (assignment_expression "iVar6 = iVar6 + iVar5" (identifier "iVar6") (= "=") (binary_expression "iVar6 + iVar5" (identifier "iVar6") (+ "+") (identifier "iVar5"))) (; ";")) (} "}")))) (labeled_statement "LAB_000df0b8:" (statement_identifier "LAB_000df0b8") (: ":") (expression_statement "" (; ""))) (} "}")) (while "while") (parenthesized_expression "(iVar6 <= param_3)" (( "(") (binary_expression "iVar6 <= param_3" (identifier "iVar6") (<= "<=") (identifier "param_3")) () ")")) (; ";")) (if_statement "if (local_2c != *(int *)puVar4) {\n    puVar8 = PTR___stack_chk_fail_00146488;\n    (*(code *)PTR___stack_chk_fail_00146488)();\n    iVar6 = (**(code **)(puVar8 + 0x67228))();\n    return iVar6;\n  }" (if "if") (parenthesized_expression "(local_2c != *(int *)puVar4)" (( "(") (binary_expression "local_2c != *(int *)puVar4" (identifier "local_2c") (!= "!=") (pointer_expression "*(int *)puVar4" (* "*") (cast_expression "(int *)puVar4" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar4")))) () ")")) (compound_statement "{\n    puVar8 = PTR___stack_chk_fail_00146488;\n    (*(code *)PTR___stack_chk_fail_00146488)();\n    iVar6 = (**(code **)(puVar8 + 0x67228))();\n    return iVar6;\n  }" ({ "{") (expression_statement "puVar8 = PTR___stack_chk_fail_00146488;" (assignment_expression "puVar8 = PTR___stack_chk_fail_00146488" (identifier "puVar8") (= "=") (identifier "PTR___stack_chk_fail_00146488")) (; ";")) (expression_statement "(*(code *)PTR___stack_chk_fail_00146488)();" (call_expression "(*(code *)PTR___stack_chk_fail_00146488)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00146488)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_00146488" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_00146488" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_00146488"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar6 = (**(code **)(puVar8 + 0x67228))();" (assignment_expression "iVar6 = (**(code **)(puVar8 + 0x67228))()" (identifier "iVar6") (= "=") (call_expression "(**(code **)(puVar8 + 0x67228))()" (parenthesized_expression "(**(code **)(puVar8 + 0x67228))" (( "(") (pointer_expression "**(code **)(puVar8 + 0x67228)" (* "*") (pointer_expression "*(code **)(puVar8 + 0x67228)" (* "*") (cast_expression "(code **)(puVar8 + 0x67228)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar8 + 0x67228)" (( "(") (binary_expression "puVar8 + 0x67228" (identifier "puVar8") (+ "+") (number_literal "0x67228")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return iVar6;" (return "return") (identifier "iVar6") (; ";")) (} "}"))) (return_statement "return iVar7;" (return "return") (identifier "iVar7") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) 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: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal)))))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal))) right: (number_literal))) right: (parenthesized_expression (parenthesized_expression (binary_expression left: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (number_literal)) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (char_literal (escape_sequence)))))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (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 (number_literal) (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (binary_expression left: (identifier) right: (identifier)) (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))))) (labeled_statement label: (statement_identifier) (expression_statement (MISSING ";")))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))) consequence: (compound_statement (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)))) (return_statement (identifier)))) (return_statement (identifier)))))

int MASKED(int param_1,int param_2,int param_3)

{
  byte bVar1;
  undefined *puVar2;
  undefined *puVar3;
  undefined *puVar4;
  int iVar5;
  int iVar6;
  int iVar7;
  undefined *puVar8;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  int local_2c;
  
  puVar4 = PTR___stack_chk_guard_001464dc;
  puVar3 = PTR_is_basic_table_00144b04;
  puVar2 = PTR_locale_mb_cur_max_00144b00;
  puVar8 = PTR_locale_utf8locale_00144afc;
  iVar7 = 0;
  iVar6 = 0;
  local_3c = 0;
  local_38 = 0;
  local_2c = *(int *)PTR___stack_chk_guard_001464dc;
  do {
    bVar1 = *(byte *)(param_1 + iVar6);
    if (bVar1 == 0) break;
    iVar7 = iVar7 + 1;
    if (*(int *)puVar2 < 2) {
LAB_000df144:
      iVar6 = iVar6 + 1;
    }
    else {
      iVar5 = 1;
      if (((*(uint *)(puVar3 + (uint)(bVar1 >> 5) * 4) >> (bVar1 & 0x1f) & 1) == 0) &&
         ((*(int *)puVar8 == 0 || (iVar5 = 1, (char)bVar1 < '\0')))) {
        local_34 = local_3c;
        local_30 = local_38;
        iVar5 = (*(code *)PTR_mbrtowc_00146408)
                          (0,(byte *)(param_1 + iVar6),param_2 - iVar6,&local_3c);
        if (iVar5 + 2U < 2) {
          local_3c = local_34;
          iVar6 = iVar6 + 1;
          local_38 = local_30;
          goto LAB_000df0b8;
        }
        if (iVar5 == 0) goto LAB_000df144;
      }
      iVar6 = iVar6 + iVar5;
    }
LAB_000df0b8:
  } while (iVar6 <= param_3);
  if (local_2c != *(int *)puVar4) {
    puVar8 = PTR___stack_chk_fail_00146488;
    (*(code *)PTR___stack_chk_fail_00146488)();
    iVar6 = (**(code **)(puVar8 + 0x67228))();
    return iVar6;
  }
  return iVar7;
}

