
int mbsnwidth(char *string,size_t nbytes,int flags)

{
  bool bVar1;
  ushort uVar2;
  char *string_00;
  uint uVar3;
  int iVar4;
  int *piVar5;
  size_t sVar6;
  int iVar7;
  char *pcVar8;
  char *pcVar9;
  undefined *puVar10;
  wchar_t wc;
  mbstate_t mbstate;
  
  puVar10 = PTR___stack_chk_guard_000363a0;
  pcVar8 = string + nbytes;
  string_00 = *(char **)PTR___stack_chk_guard_000363a0;
  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();
  if (uVar3 < 2) {
    iVar7 = 0;
    if (string < pcVar8) {
      pcVar9 = string + 1;
      piVar5 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();
      nbytes = 0x7fffffff;
      do {
        uVar2 = *(ushort *)(*piVar5 + (uint)(byte)pcVar9[-1] * 2);
        if ((uVar2 & 0x40) == 0) {
          if ((flags & 2U) != 0) goto LAB_000172f0;
          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;
        }
        else {
LAB_000172bc:
          if (iVar7 == 0x7fffffff) break;
          iVar7 = iVar7 + 1;
        }
        bVar1 = pcVar8 != pcVar9;
        pcVar9 = pcVar9 + 1;
      } while (bVar1);
    }
  }
  else {
    iVar7 = 0;
    if (string < pcVar8) {
      do {
        iVar4 = (int)*string;
        if (iVar4 < 0x40) {
          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;
LAB_000171a8:
          mbstate.__count = 0;
          mbstate.__value.__wch = 0;
          do {
            nbytes = (size_t)string;
            sVar6 = rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate);
            if (sVar6 == 0xffffffff) {
              if ((flags & 1U) != 0) goto LAB_000172f0;
              goto LAB_00017130;
            }
            if (sVar6 == 0xfffffffe) {
              if ((flags & 1U) != 0) goto LAB_000172f0;
              iVar7 = iVar7 + 1;
              string = pcVar8;
              break;
            }
            if (sVar6 == 0) {
              sVar6 = 1;
            }
            iVar4 = (*(code *)PTR_wcwidth_000363ac)(wc);
            if (iVar4 < 0) {
              if ((flags & 2U) != 0) goto LAB_000172f0;
              iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);
              if (iVar4 == 0) {
                if (iVar7 == 0x7fffffff) goto LAB_00017314;
                iVar7 = iVar7 + 1;
              }
            }
            else {
              if (0x7fffffff - iVar7 < iVar4) {
LAB_00017314:
                iVar7 = 0x7fffffff;
                goto LAB_00017144;
              }
              iVar7 = iVar7 + iVar4;
            }
            string = string + sVar6;
            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&mbstate);
          } while (iVar4 == 0);
        }
        else {
          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))
          goto LAB_000171a8;
LAB_00017130:
          iVar7 = iVar7 + 1;
          string = string + 1;
        }
      } while (string < pcVar8);
    }
  }
LAB_00017144:
  if (string_00 != *(char **)puVar10) {
    puVar10 = PTR___stack_chk_fail_00036384;
    (*(code *)PTR___stack_chk_fail_00036384)();
    sVar6 = (**(code **)(puVar10 + 0x1f004))();
    iVar7 = mbsnwidth(string_00,sVar6,nbytes);
    return iVar7;
  }
  return iVar7;
LAB_000172f0:
  iVar7 = -1;
  goto LAB_00017144;
}



int mbsnwidth(char *param_1,char *param_2,uint param_3)

{
  bool bVar1;
  ushort uVar2;
  uint uVar3;
  int iVar4;
  int iVar5;
  int *piVar6;
  undefined4 uVar7;
  int iVar8;
  char *pcVar9;
  undefined *puVar10;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  int local_2c;
  
  puVar10 = PTR___stack_chk_guard_000363a0;
  pcVar9 = param_1 + (int)param_2;
  local_2c = *(int *)PTR___stack_chk_guard_000363a0;
  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();
  if (uVar3 < 2) {
    iVar8 = 0;
    if (param_1 < pcVar9) {
      param_1 = param_1 + 1;
      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();
      param_2 = (char *)0x7fffffff;
      do {
        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);
        if ((uVar2 & 0x40) == 0) {
          if ((param_3 & 2) != 0) goto LAB_000172f0;
          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;
        }
        else {
LAB_000172bc:
          if (iVar8 == 0x7fffffff) break;
          iVar8 = iVar8 + 1;
        }
        bVar1 = pcVar9 != param_1;
        param_1 = param_1 + 1;
      } while (bVar1);
    }
  }
  else {
    iVar8 = 0;
    if (param_1 < pcVar9) {
      do {
        iVar4 = (int)*param_1;
        if (iVar4 < 0x40) {
          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;
LAB_000171a8:
          local_34 = 0;
          local_30 = 0;
          do {
            param_2 = param_1;
            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);
            if (iVar4 == -1) {
              if ((param_3 & 1) != 0) goto LAB_000172f0;
              goto LAB_00017130;
            }
            if (iVar4 == -2) {
              if ((param_3 & 1) != 0) goto LAB_000172f0;
              iVar8 = iVar8 + 1;
              param_1 = pcVar9;
              break;
            }
            if (iVar4 == 0) {
              iVar4 = 1;
            }
            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);
            if (iVar5 < 0) {
              if ((param_3 & 2) != 0) goto LAB_000172f0;
              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);
              if (iVar5 == 0) {
                if (iVar8 == 0x7fffffff) goto LAB_00017314;
                iVar8 = iVar8 + 1;
              }
            }
            else {
              if (0x7fffffff - iVar8 < iVar5) {
LAB_00017314:
                iVar8 = 0x7fffffff;
                goto LAB_00017144;
              }
              iVar8 = iVar8 + iVar5;
            }
            param_1 = param_1 + iVar4;
            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);
          } while (iVar4 == 0);
        }
        else {
          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))
          goto LAB_000171a8;
LAB_00017130:
          iVar8 = iVar8 + 1;
          param_1 = param_1 + 1;
        }
      } while (param_1 < pcVar9);
    }
  }
LAB_00017144:
  if (local_2c != *(int *)puVar10) {
    iVar8 = local_2c;
    puVar10 = PTR___stack_chk_fail_00036384;
    (*(code *)PTR___stack_chk_fail_00036384)();
    uVar7 = (**(code **)(puVar10 + 0x1f004))();
    iVar8 = mbsnwidth(iVar8,uVar7,param_2);
    return iVar8;
  }
  return iVar8;
LAB_000172f0:
  iVar8 = -1;
  goto LAB_00017144;
}


lui gp,0x2
addiu gp,gp,0x70b0
addu gp,gp,t9
lw v0,-0x7d80(gp)
addiu sp,sp,-0x58
lw t9,-0x7dbc(gp)
sw v0,0x1c(sp)
sw gp,0x10(sp)
sw s6,0x48(sp)
or s6,a0,zero
sw s1,0x34(sp)
addu s1,a0,a1
sw ra,0x54(sp)
sw s8,0x50(sp)
sw s7,0x4c(sp)
sw s5,0x44(sp)
sw s4,0x40(sp)
sw s3,0x3c(sp)
sw s2,0x38(sp)
sw s0,0x30(sp)
sw a2,0x60(sp)
lw v0,0x0(v0)
sw v0,0x2c(sp)
jalr t9
_nop
sltiu v0,v0,0x2
bne v0,zero,0x00017260
_lw gp,0x10(sp)
sltu v0,s6,s1
beq v0,zero,0x00017140
_or s0,zero,zero
lw v0,0x60(sp)
lui s2,0x7fff
ori s2,s2,0xffff
andi v0,v0,0x2
sw v0,0x18(sp)
lb v0,0x0(s6)
slti v1,v0,0x40
beq v1,zero,0x00017184
_slti v1,v0,0x41
slti v1,v0,0x25
beq v1,zero,0x0001712c
_addiu v0,v0,-0x20
andi v0,v0,0xff
sltiu v0,v0,0x4
beq v0,zero,0x000171a8
_addiu s4,sp,0x24
addiu s6,s6,0x1
addiu s0,s0,0x1
sltu v0,s6,s1
bne v0,zero,0x00017100
_nop
lw v1,0x1c(sp)
or v0,s0,zero
lw a0,0x2c(sp)
lw v1,0x0(v1)
bne a0,v1,0x00017320
_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
bne v1,zero,0x000171a4
_slti v1,v0,0x60
bne v1,zero,0x0001712c
_addiu v0,v0,-0x61
andi v0,v0,0xff
sltiu v0,v0,0x1e
bne v0,zero,0x0001712c
_nop
addiu s4,sp,0x24
sw zero,0x24(sp)
addiu s5,sp,0x20
li s7,-0x1
sw zero,0x4(s4)
b 0x000171ec
_li s8,-0x2
subu a0,s2,s0
slt a0,a0,v0
bne a0,zero,0x00017314
_nop
addu s0,s0,v0
lw t9,-0x7d84(gp)
or a0,s4,zero
jalr t9
_addu s6,s6,s3
bne v0,zero,0x00017134
_lw gp,0x10(sp)
lw t9,-0x7f34(gp)
subu a2,s1,s6
or a3,s4,zero
or a1,s6,zero
bal 0x0001f4f0
_or a0,s5,zero
lw gp,0x10(sp)
beq v0,s7,0x000172dc
_or s3,v0,zero
beq v0,s8,0x000172f8
_nop
bne v0,zero,0x00017224
_lw t9,-0x7d74(gp)
li s3,0x1
jalr t9
_lw a0,0x20(sp)
bgez v0,0x000171c0
_lw gp,0x10(sp)
lw v0,0x18(sp)
bne v0,zero,0x000172f0
_lw t9,-0x7da4(gp)
jalr t9
_lw a0,0x20(sp)
bne v0,zero,0x000171d4
_lw gp,0x10(sp)
beq s0,s2,0x00017314
_nop
b 0x000171d4
_addiu s0,s0,0x1
sltu v0,s6,s1
beq v0,zero,0x00017140
_or s0,zero,zero
lw t9,-0x7e84(gp)
jalr t9
_addiu s6,s6,0x1
lui a1,0x7fff
lw a0,0x0(v0)
lw v0,0x60(sp)
ori a1,a1,0xffff
lw gp,0x10(sp)
andi s4,v0,0x2
lbu v0,-0x1(s6)
sll v0,v0,0x1
addu v0,a0,v0
lhu v0,0x0(v0)
andi v1,v0,0x40
bne v1,zero,0x000172bc
_nop
bne s4,zero,0x000172f0
_andi v0,v0,0x200
bne v0,zero,0x000172c8
_nop
beq s0,a1,0x00017144
_lw v1,0x1c(sp)
addiu s0,s0,0x1
bne s1,s6,0x00017290
_addiu s6,s6,0x1
addiu s6,s6,-0x1
b 0x00017144
_lw v1,0x1c(sp)
lw v0,0x60(sp)
andi v0,v0,0x1
beq v0,zero,0x00017130
_addiu s6,s6,0x1
addiu s6,s6,-0x1
b 0x00017140
_li s0,-0x1
lw v0,0x60(sp)
andi v0,v0,0x1
bne v0,zero,0x000172f0
_nop
addiu s0,s0,0x1
b 0x00017134
_or s6,s1,zero
lui s0,0x7fff
b 0x00017140
_ori s0,s0,0xffff
lw t9,-0x7d9c(gp)
jalr t9
_nop
(translation_unit "int mbsnwidth(char *param_1,char *param_2,uint param_3)\n\n{\n  bool bVar1;\n  ushort uVar2;\n  uint uVar3;\n  int iVar4;\n  int iVar5;\n  int *piVar6;\n  undefined4 uVar7;\n  int iVar8;\n  char *pcVar9;\n  undefined *puVar10;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar10 = PTR___stack_chk_guard_000363a0;\n  pcVar9 = param_1 + (int)param_2;\n  local_2c = *(int *)PTR___stack_chk_guard_000363a0;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();\n  if (uVar3 < 2) {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }\n  }\n  else {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }\n  }\nLAB_00017144:\n  if (local_2c != *(int *)puVar10) {\n    iVar8 = local_2c;\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    uVar7 = (**(code **)(puVar10 + 0x1f004))();\n    iVar8 = mbsnwidth(iVar8,uVar7,param_2);\n    return iVar8;\n  }\n  return iVar8;\nLAB_000172f0:\n  iVar8 = -1;\n  goto LAB_00017144;\n}\n\n" (function_definition "int mbsnwidth(char *param_1,char *param_2,uint param_3)\n\n{\n  bool bVar1;\n  ushort uVar2;\n  uint uVar3;\n  int iVar4;\n  int iVar5;\n  int *piVar6;\n  undefined4 uVar7;\n  int iVar8;\n  char *pcVar9;\n  undefined *puVar10;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar10 = PTR___stack_chk_guard_000363a0;\n  pcVar9 = param_1 + (int)param_2;\n  local_2c = *(int *)PTR___stack_chk_guard_000363a0;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();\n  if (uVar3 < 2) {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }\n  }\n  else {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }\n  }\nLAB_00017144:\n  if (local_2c != *(int *)puVar10) {\n    iVar8 = local_2c;\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    uVar7 = (**(code **)(puVar10 + 0x1f004))();\n    iVar8 = mbsnwidth(iVar8,uVar7,param_2);\n    return iVar8;\n  }\n  return iVar8;\nLAB_000172f0:\n  iVar8 = -1;\n  goto LAB_00017144;\n}" primitive_type (function_declarator "mbsnwidth(char *param_1,char *param_2,uint param_3)" identifier (parameter_list "(char *param_1,char *param_2,uint param_3)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  bool bVar1;\n  ushort uVar2;\n  uint uVar3;\n  int iVar4;\n  int iVar5;\n  int *piVar6;\n  undefined4 uVar7;\n  int iVar8;\n  char *pcVar9;\n  undefined *puVar10;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar10 = PTR___stack_chk_guard_000363a0;\n  pcVar9 = param_1 + (int)param_2;\n  local_2c = *(int *)PTR___stack_chk_guard_000363a0;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();\n  if (uVar3 < 2) {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }\n  }\n  else {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }\n  }\nLAB_00017144:\n  if (local_2c != *(int *)puVar10) {\n    iVar8 = local_2c;\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    uVar7 = (**(code **)(puVar10 + 0x1f004))();\n    iVar8 = mbsnwidth(iVar8,uVar7,param_2);\n    return iVar8;\n  }\n  return iVar8;\nLAB_000172f0:\n  iVar8 = -1;\n  goto LAB_00017144;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "ushort uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (declaration "undefined4 uVar7;" type_identifier identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "char *pcVar9;" primitive_type (pointer_declarator "*pcVar9" * identifier) ;) (declaration "undefined *puVar10;" type_identifier (pointer_declarator "*puVar10" * 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 "puVar10 = PTR___stack_chk_guard_000363a0;" (assignment_expression "puVar10 = PTR___stack_chk_guard_000363a0" identifier = identifier) ;) (expression_statement "pcVar9 = param_1 + (int)param_2;" (assignment_expression "pcVar9 = param_1 + (int)param_2" identifier = (binary_expression "param_1 + (int)param_2" identifier + (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "local_2c = *(int *)PTR___stack_chk_guard_000363a0;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_000363a0" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000363a0" * (cast_expression "(int *)PTR___stack_chk_guard_000363a0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();" (assignment_expression "uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)()" identifier = (call_expression "(*(code *)PTR___ctype_get_mb_cur_max_00036364)()" (parenthesized_expression "(*(code *)PTR___ctype_get_mb_cur_max_00036364)" ( (pointer_expression "*(code *)PTR___ctype_get_mb_cur_max_00036364" * (cast_expression "(code *)PTR___ctype_get_mb_cur_max_00036364" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (uVar3 < 2) {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }\n  }\n  else {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }\n  }" if (parenthesized_expression "(uVar3 < 2)" ( (binary_expression "uVar3 < 2" identifier < number_literal) )) (compound_statement "{\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }\n  }" { (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) (if_statement "if (param_1 < pcVar9) {\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }" if (parenthesized_expression "(param_1 < pcVar9)" ( (binary_expression "param_1 < pcVar9" identifier < identifier) )) (compound_statement "{\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }" { (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();" (assignment_expression "piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)()" identifier = (cast_expression "(int *)(*(code *)PTR___ctype_b_loc_0003629c)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___ctype_b_loc_0003629c)()" (parenthesized_expression "(*(code *)PTR___ctype_b_loc_0003629c)" ( (pointer_expression "*(code *)PTR___ctype_b_loc_0003629c" * (cast_expression "(code *)PTR___ctype_b_loc_0003629c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "param_2 = (char *)0x7fffffff;" (assignment_expression "param_2 = (char *)0x7fffffff" identifier = (cast_expression "(char *)0x7fffffff" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (do_statement "do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);" do (compound_statement "{\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      }" { (expression_statement "uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);" (assignment_expression "uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2)" identifier = (pointer_expression "*(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2)" * (cast_expression "(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar6 + (uint)(byte)param_1[-1] * 2)" ( (binary_expression "*piVar6 + (uint)(byte)param_1[-1] * 2" (pointer_expression "*piVar6" * identifier) + (binary_expression "(uint)(byte)param_1[-1] * 2" (cast_expression "(uint)(byte)param_1[-1]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)param_1[-1]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "param_1[-1]" identifier [ number_literal ]))) * number_literal)) ))))) ;) (if_statement "if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }" if (parenthesized_expression "((uVar2 & 0x40) == 0)" ( (binary_expression "(uVar2 & 0x40) == 0" (parenthesized_expression "(uVar2 & 0x40)" ( (binary_expression "uVar2 & 0x40" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }" { (if_statement "if ((param_3 & 2) != 0) goto LAB_000172f0;" if (parenthesized_expression "((param_3 & 2) != 0)" ( (binary_expression "(param_3 & 2) != 0" (parenthesized_expression "(param_3 & 2)" ( (binary_expression "param_3 & 2" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_000172f0;" goto statement_identifier ;)) (if_statement "if ((uVar2 & 0x200) == 0) goto LAB_000172bc;" if (parenthesized_expression "((uVar2 & 0x200) == 0)" ( (binary_expression "(uVar2 & 0x200) == 0" (parenthesized_expression "(uVar2 & 0x200)" ( (binary_expression "uVar2 & 0x200" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_000172bc;" goto statement_identifier ;)) }) (else_clause "else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }" else (compound_statement "{\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }" { (labeled_statement "LAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;" statement_identifier : (if_statement "if (iVar8 == 0x7fffffff) break;" if (parenthesized_expression "(iVar8 == 0x7fffffff)" ( (binary_expression "iVar8 == 0x7fffffff" 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)) ;) }))) (expression_statement "bVar1 = pcVar9 != param_1;" (assignment_expression "bVar1 = pcVar9 != param_1" identifier = (binary_expression "pcVar9 != param_1" identifier != identifier)) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar1)" ( identifier )) ;) })) }) (else_clause "else {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }\n  }" else (compound_statement "{\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }\n  }" { (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) (if_statement "if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }" if (parenthesized_expression "(param_1 < pcVar9)" ( (binary_expression "param_1 < pcVar9" identifier < identifier) )) (compound_statement "{\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }" { (do_statement "do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);" do (compound_statement "{\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      }" { (expression_statement "iVar4 = (int)*param_1;" (assignment_expression "iVar4 = (int)*param_1" identifier = (cast_expression "(int)*param_1" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }" if (parenthesized_expression "(iVar4 < 0x40)" ( (binary_expression "iVar4 < 0x40" identifier < number_literal) )) (compound_statement "{\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }" { (if_statement "if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;" if (parenthesized_expression "((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4))" ( (binary_expression "(0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)" (parenthesized_expression "(0x24 < iVar4)" ( (binary_expression "0x24 < iVar4" number_literal < identifier) )) || (parenthesized_expression "((iVar4 - 0x20U & 0xff) < 4)" ( (binary_expression "(iVar4 - 0x20U & 0xff) < 4" (parenthesized_expression "(iVar4 - 0x20U & 0xff)" ( (binary_expression "iVar4 - 0x20U & 0xff" (binary_expression "iVar4 - 0x20U" identifier - number_literal) & number_literal) )) < number_literal) ))) )) (goto_statement "goto LAB_00017130;" goto statement_identifier ;)) (labeled_statement "LAB_000171a8:\n          local_34 = 0;" statement_identifier : (expression_statement "local_34 = 0;" (assignment_expression "local_34 = 0" identifier = number_literal) ;)) (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" identifier = number_literal) ;) (do_statement "do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);" do (compound_statement "{\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          }" { (expression_statement "param_2 = param_1;" (assignment_expression "param_2 = param_1" identifier = identifier) ;) (expression_statement "iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);" (assignment_expression "iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34)" identifier = (call_expression "rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34)" identifier (argument_list "(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34)" ( (pointer_expression "&local_38" & identifier) , identifier , (binary_expression "(int)pcVar9 - (int)param_1" (cast_expression "(int)pcVar9" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier)) , (pointer_expression "&local_34" & identifier) )))) ;) (if_statement "if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (compound_statement "{\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }" { (if_statement "if ((param_3 & 1) != 0) goto LAB_000172f0;" if (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_000172f0;" goto statement_identifier ;)) (goto_statement "goto LAB_00017130;" goto statement_identifier ;) })) (if_statement "if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }" if (parenthesized_expression "(iVar4 == -2)" ( (binary_expression "iVar4 == -2" identifier == number_literal) )) (compound_statement "{\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }" { (if_statement "if ((param_3 & 1) != 0) goto LAB_000172f0;" if (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_000172f0;" goto statement_identifier ;)) (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" identifier = (binary_expression "iVar8 + 1" identifier + number_literal)) ;) (expression_statement "param_1 = pcVar9;" (assignment_expression "param_1 = pcVar9" identifier = identifier) ;) (break_statement "break;" break ;) })) (if_statement "if (iVar4 == 0) {\n              iVar4 = 1;\n            }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n              iVar4 = 1;\n            }" { (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) })) (expression_statement "iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);" (assignment_expression "iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38)" identifier = (call_expression "(*(code *)PTR_wcwidth_000363ac)(local_38)" (parenthesized_expression "(*(code *)PTR_wcwidth_000363ac)" ( (pointer_expression "*(code *)PTR_wcwidth_000363ac" * (cast_expression "(code *)PTR_wcwidth_000363ac" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(local_38)" ( identifier )))) ;) (if_statement "if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }" if (parenthesized_expression "(iVar5 < 0)" ( (binary_expression "iVar5 < 0" identifier < number_literal) )) (compound_statement "{\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }" { (if_statement "if ((param_3 & 2) != 0) goto LAB_000172f0;" if (parenthesized_expression "((param_3 & 2) != 0)" ( (binary_expression "(param_3 & 2) != 0" (parenthesized_expression "(param_3 & 2)" ( (binary_expression "param_3 & 2" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_000172f0;" goto statement_identifier ;)) (expression_statement "iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);" (assignment_expression "iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38)" identifier = (call_expression "(*(code *)PTR_iswcntrl_0003637c)(local_38)" (parenthesized_expression "(*(code *)PTR_iswcntrl_0003637c)" ( (pointer_expression "*(code *)PTR_iswcntrl_0003637c" * (cast_expression "(code *)PTR_iswcntrl_0003637c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(local_38)" ( identifier )))) ;) (if_statement "if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }" { (if_statement "if (iVar8 == 0x7fffffff) goto LAB_00017314;" if (parenthesized_expression "(iVar8 == 0x7fffffff)" ( (binary_expression "iVar8 == 0x7fffffff" identifier == number_literal) )) (goto_statement "goto LAB_00017314;" goto statement_identifier ;)) (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" identifier = (binary_expression "iVar8 + 1" identifier + number_literal)) ;) })) }) (else_clause "else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }" else (compound_statement "{\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }" { (if_statement "if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }" if (parenthesized_expression "(0x7fffffff - iVar8 < iVar5)" ( (binary_expression "0x7fffffff - iVar8 < iVar5" (binary_expression "0x7fffffff - iVar8" number_literal - identifier) < identifier) )) (compound_statement "{\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }" { (labeled_statement "LAB_00017314:\n                iVar8 = 0x7fffffff;" statement_identifier : (expression_statement "iVar8 = 0x7fffffff;" (assignment_expression "iVar8 = 0x7fffffff" identifier = number_literal) ;)) (goto_statement "goto LAB_00017144;" goto statement_identifier ;) })) (expression_statement "iVar8 = iVar8 + iVar5;" (assignment_expression "iVar8 = iVar8 + iVar5" identifier = (binary_expression "iVar8 + iVar5" identifier + identifier)) ;) }))) (expression_statement "param_1 = param_1 + iVar4;" (assignment_expression "param_1 = param_1 + iVar4" identifier = (binary_expression "param_1 + iVar4" identifier + identifier)) ;) (expression_statement "iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);" (assignment_expression "iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34)" identifier = (call_expression "(*(code *)PTR_mbsinit_0003639c)(&local_34)" (parenthesized_expression "(*(code *)PTR_mbsinit_0003639c)" ( (pointer_expression "*(code *)PTR_mbsinit_0003639c" * (cast_expression "(code *)PTR_mbsinit_0003639c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(&local_34)" ( (pointer_expression "&local_34" & identifier) )))) ;) }) while (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) ;) }) (else_clause "else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }" else (compound_statement "{\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }" { (if_statement "if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;" if (parenthesized_expression "((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))" ( (binary_expression "(iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff))))" (parenthesized_expression "(iVar4 < 0x41)" ( (binary_expression "iVar4 < 0x41" identifier < number_literal) )) || (parenthesized_expression "((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff))))" ( (parenthesized_expression "(0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))" ( (binary_expression "0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff))" (binary_expression "0x5f < iVar4" number_literal < identifier) && (parenthesized_expression "(0x1d < (iVar4 - 0x61U & 0xff))" ( (binary_expression "0x1d < (iVar4 - 0x61U & 0xff)" number_literal < (parenthesized_expression "(iVar4 - 0x61U & 0xff)" ( (binary_expression "iVar4 - 0x61U & 0xff" (binary_expression "iVar4 - 0x61U" identifier - number_literal) & number_literal) ))) ))) )) ))) )) (goto_statement "goto LAB_000171a8;" goto statement_identifier ;)) (labeled_statement "LAB_00017130:\n          iVar8 = iVar8 + 1;" statement_identifier : (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" identifier = (binary_expression "iVar8 + 1" identifier + number_literal)) ;)) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) }))) }) while (parenthesized_expression "(param_1 < pcVar9)" ( (binary_expression "param_1 < pcVar9" identifier < identifier) )) ;) })) }))) (labeled_statement "LAB_00017144:\n  if (local_2c != *(int *)puVar10) {\n    iVar8 = local_2c;\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    uVar7 = (**(code **)(puVar10 + 0x1f004))();\n    iVar8 = mbsnwidth(iVar8,uVar7,param_2);\n    return iVar8;\n  }" statement_identifier : (if_statement "if (local_2c != *(int *)puVar10) {\n    iVar8 = local_2c;\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    uVar7 = (**(code **)(puVar10 + 0x1f004))();\n    iVar8 = mbsnwidth(iVar8,uVar7,param_2);\n    return iVar8;\n  }" if (parenthesized_expression "(local_2c != *(int *)puVar10)" ( (binary_expression "local_2c != *(int *)puVar10" identifier != (pointer_expression "*(int *)puVar10" * (cast_expression "(int *)puVar10" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    iVar8 = local_2c;\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    uVar7 = (**(code **)(puVar10 + 0x1f004))();\n    iVar8 = mbsnwidth(iVar8,uVar7,param_2);\n    return iVar8;\n  }" { (expression_statement "iVar8 = local_2c;" (assignment_expression "iVar8 = local_2c" identifier = identifier) ;) (expression_statement "puVar10 = PTR___stack_chk_fail_00036384;" (assignment_expression "puVar10 = PTR___stack_chk_fail_00036384" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_00036384)();" (call_expression "(*(code *)PTR___stack_chk_fail_00036384)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00036384)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00036384" * (cast_expression "(code *)PTR___stack_chk_fail_00036384" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "uVar7 = (**(code **)(puVar10 + 0x1f004))();" (assignment_expression "uVar7 = (**(code **)(puVar10 + 0x1f004))()" identifier = (call_expression "(**(code **)(puVar10 + 0x1f004))()" (parenthesized_expression "(**(code **)(puVar10 + 0x1f004))" ( (pointer_expression "**(code **)(puVar10 + 0x1f004)" * (pointer_expression "*(code **)(puVar10 + 0x1f004)" * (cast_expression "(code **)(puVar10 + 0x1f004)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x1f004)" ( (binary_expression "puVar10 + 0x1f004" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (expression_statement "iVar8 = mbsnwidth(iVar8,uVar7,param_2);" (assignment_expression "iVar8 = mbsnwidth(iVar8,uVar7,param_2)" identifier = (call_expression "mbsnwidth(iVar8,uVar7,param_2)" identifier (argument_list "(iVar8,uVar7,param_2)" ( identifier , identifier , identifier )))) ;) (return_statement "return iVar8;" return identifier ;) }))) (return_statement "return iVar8;" return identifier ;) (labeled_statement "LAB_000172f0:\n  iVar8 = -1;" statement_identifier : (expression_statement "iVar8 = -1;" (assignment_expression "iVar8 = -1" identifier = number_literal) ;)) (goto_statement "goto LAB_00017144;" goto statement_identifier ;) })))
(translation_unit "int mbsnwidth(char *string,size_t nbytes,int flags)\n\n{\n  bool bVar1;\n  ushort uVar2;\n  char *string_00;\n  uint uVar3;\n  int iVar4;\n  int *piVar5;\n  size_t sVar6;\n  int iVar7;\n  char *pcVar8;\n  char *pcVar9;\n  undefined *puVar10;\n  wchar_t wc;\n  mbstate_t mbstate;\n  \n  puVar10 = PTR___stack_chk_guard_000363a0;\n  pcVar8 = string + nbytes;\n  string_00 = *(char **)PTR___stack_chk_guard_000363a0;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();\n  if (uVar3 < 2) {\n    iVar7 = 0;\n    if (string < pcVar8) {\n      pcVar9 = string + 1;\n      piVar5 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      nbytes = 0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar5 + (uint)(byte)pcVar9[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar7 == 0x7fffffff) break;\n          iVar7 = iVar7 + 1;\n        }\n        bVar1 = pcVar8 != pcVar9;\n        pcVar9 = pcVar9 + 1;\n      } while (bVar1);\n    }\n  }\n  else {\n    iVar7 = 0;\n    if (string < pcVar8) {\n      do {\n        iVar4 = (int)*string;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          do {\n            nbytes = (size_t)string;\n            sVar6 = rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate);\n            if (sVar6 == 0xffffffff) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (sVar6 == 0xfffffffe) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              iVar7 = iVar7 + 1;\n              string = pcVar8;\n              break;\n            }\n            if (sVar6 == 0) {\n              sVar6 = 1;\n            }\n            iVar4 = (*(code *)PTR_wcwidth_000363ac)(wc);\n            if (iVar4 < 0) {\n              if ((flags & 2U) != 0) goto LAB_000172f0;\n              iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);\n              if (iVar4 == 0) {\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar7 = iVar7 + iVar4;\n            }\n            string = string + sVar6;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&mbstate);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar7 = iVar7 + 1;\n          string = string + 1;\n        }\n      } while (string < pcVar8);\n    }\n  }\nLAB_00017144:\n  if (string_00 != *(char **)puVar10) {\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    sVar6 = (**(code **)(puVar10 + 0x1f004))();\n    iVar7 = mbsnwidth(string_00,sVar6,nbytes);\n    return iVar7;\n  }\n  return iVar7;\nLAB_000172f0:\n  iVar7 = -1;\n  goto LAB_00017144;\n}\n\n" (function_definition "int mbsnwidth(char *string,size_t nbytes,int flags)\n\n{\n  bool bVar1;\n  ushort uVar2;\n  char *string_00;\n  uint uVar3;\n  int iVar4;\n  int *piVar5;\n  size_t sVar6;\n  int iVar7;\n  char *pcVar8;\n  char *pcVar9;\n  undefined *puVar10;\n  wchar_t wc;\n  mbstate_t mbstate;\n  \n  puVar10 = PTR___stack_chk_guard_000363a0;\n  pcVar8 = string + nbytes;\n  string_00 = *(char **)PTR___stack_chk_guard_000363a0;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();\n  if (uVar3 < 2) {\n    iVar7 = 0;\n    if (string < pcVar8) {\n      pcVar9 = string + 1;\n      piVar5 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      nbytes = 0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar5 + (uint)(byte)pcVar9[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar7 == 0x7fffffff) break;\n          iVar7 = iVar7 + 1;\n        }\n        bVar1 = pcVar8 != pcVar9;\n        pcVar9 = pcVar9 + 1;\n      } while (bVar1);\n    }\n  }\n  else {\n    iVar7 = 0;\n    if (string < pcVar8) {\n      do {\n        iVar4 = (int)*string;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          do {\n            nbytes = (size_t)string;\n            sVar6 = rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate);\n            if (sVar6 == 0xffffffff) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (sVar6 == 0xfffffffe) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              iVar7 = iVar7 + 1;\n              string = pcVar8;\n              break;\n            }\n            if (sVar6 == 0) {\n              sVar6 = 1;\n            }\n            iVar4 = (*(code *)PTR_wcwidth_000363ac)(wc);\n            if (iVar4 < 0) {\n              if ((flags & 2U) != 0) goto LAB_000172f0;\n              iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);\n              if (iVar4 == 0) {\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar7 = iVar7 + iVar4;\n            }\n            string = string + sVar6;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&mbstate);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar7 = iVar7 + 1;\n          string = string + 1;\n        }\n      } while (string < pcVar8);\n    }\n  }\nLAB_00017144:\n  if (string_00 != *(char **)puVar10) {\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    sVar6 = (**(code **)(puVar10 + 0x1f004))();\n    iVar7 = mbsnwidth(string_00,sVar6,nbytes);\n    return iVar7;\n  }\n  return iVar7;\nLAB_000172f0:\n  iVar7 = -1;\n  goto LAB_00017144;\n}" primitive_type (function_declarator "mbsnwidth(char *string,size_t nbytes,int flags)" identifier (parameter_list "(char *string,size_t nbytes,int flags)" ( (parameter_declaration "char *string" primitive_type (pointer_declarator "*string" * identifier)) , (parameter_declaration "size_t nbytes" primitive_type identifier) , (parameter_declaration "int flags" primitive_type identifier) ))) (compound_statement "{\n  bool bVar1;\n  ushort uVar2;\n  char *string_00;\n  uint uVar3;\n  int iVar4;\n  int *piVar5;\n  size_t sVar6;\n  int iVar7;\n  char *pcVar8;\n  char *pcVar9;\n  undefined *puVar10;\n  wchar_t wc;\n  mbstate_t mbstate;\n  \n  puVar10 = PTR___stack_chk_guard_000363a0;\n  pcVar8 = string + nbytes;\n  string_00 = *(char **)PTR___stack_chk_guard_000363a0;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();\n  if (uVar3 < 2) {\n    iVar7 = 0;\n    if (string < pcVar8) {\n      pcVar9 = string + 1;\n      piVar5 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      nbytes = 0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar5 + (uint)(byte)pcVar9[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar7 == 0x7fffffff) break;\n          iVar7 = iVar7 + 1;\n        }\n        bVar1 = pcVar8 != pcVar9;\n        pcVar9 = pcVar9 + 1;\n      } while (bVar1);\n    }\n  }\n  else {\n    iVar7 = 0;\n    if (string < pcVar8) {\n      do {\n        iVar4 = (int)*string;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          do {\n            nbytes = (size_t)string;\n            sVar6 = rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate);\n            if (sVar6 == 0xffffffff) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (sVar6 == 0xfffffffe) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              iVar7 = iVar7 + 1;\n              string = pcVar8;\n              break;\n            }\n            if (sVar6 == 0) {\n              sVar6 = 1;\n            }\n            iVar4 = (*(code *)PTR_wcwidth_000363ac)(wc);\n            if (iVar4 < 0) {\n              if ((flags & 2U) != 0) goto LAB_000172f0;\n              iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);\n              if (iVar4 == 0) {\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar7 = iVar7 + iVar4;\n            }\n            string = string + sVar6;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&mbstate);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar7 = iVar7 + 1;\n          string = string + 1;\n        }\n      } while (string < pcVar8);\n    }\n  }\nLAB_00017144:\n  if (string_00 != *(char **)puVar10) {\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    sVar6 = (**(code **)(puVar10 + 0x1f004))();\n    iVar7 = mbsnwidth(string_00,sVar6,nbytes);\n    return iVar7;\n  }\n  return iVar7;\nLAB_000172f0:\n  iVar7 = -1;\n  goto LAB_00017144;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "ushort uVar2;" type_identifier identifier ;) (declaration "char *string_00;" primitive_type (pointer_declarator "*string_00" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "char *pcVar8;" primitive_type (pointer_declarator "*pcVar8" * identifier) ;) (declaration "char *pcVar9;" primitive_type (pointer_declarator "*pcVar9" * identifier) ;) (declaration "undefined *puVar10;" type_identifier (pointer_declarator "*puVar10" * identifier) ;) (declaration "wchar_t wc;" type_identifier identifier ;) (declaration "mbstate_t mbstate;" type_identifier identifier ;) (expression_statement "puVar10 = PTR___stack_chk_guard_000363a0;" (assignment_expression "puVar10 = PTR___stack_chk_guard_000363a0" identifier = identifier) ;) (expression_statement "pcVar8 = string + nbytes;" (assignment_expression "pcVar8 = string + nbytes" identifier = (binary_expression "string + nbytes" identifier + identifier)) ;) (expression_statement "string_00 = *(char **)PTR___stack_chk_guard_000363a0;" (assignment_expression "string_00 = *(char **)PTR___stack_chk_guard_000363a0" identifier = (pointer_expression "*(char **)PTR___stack_chk_guard_000363a0" * (cast_expression "(char **)PTR___stack_chk_guard_000363a0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();" (assignment_expression "uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)()" identifier = (call_expression "(*(code *)PTR___ctype_get_mb_cur_max_00036364)()" (parenthesized_expression "(*(code *)PTR___ctype_get_mb_cur_max_00036364)" ( (pointer_expression "*(code *)PTR___ctype_get_mb_cur_max_00036364" * (cast_expression "(code *)PTR___ctype_get_mb_cur_max_00036364" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (uVar3 < 2) {\n    iVar7 = 0;\n    if (string < pcVar8) {\n      pcVar9 = string + 1;\n      piVar5 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      nbytes = 0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar5 + (uint)(byte)pcVar9[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar7 == 0x7fffffff) break;\n          iVar7 = iVar7 + 1;\n        }\n        bVar1 = pcVar8 != pcVar9;\n        pcVar9 = pcVar9 + 1;\n      } while (bVar1);\n    }\n  }\n  else {\n    iVar7 = 0;\n    if (string < pcVar8) {\n      do {\n        iVar4 = (int)*string;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          do {\n            nbytes = (size_t)string;\n            sVar6 = rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate);\n            if (sVar6 == 0xffffffff) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (sVar6 == 0xfffffffe) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              iVar7 = iVar7 + 1;\n              string = pcVar8;\n              break;\n            }\n            if (sVar6 == 0) {\n              sVar6 = 1;\n            }\n            iVar4 = (*(code *)PTR_wcwidth_000363ac)(wc);\n            if (iVar4 < 0) {\n              if ((flags & 2U) != 0) goto LAB_000172f0;\n              iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);\n              if (iVar4 == 0) {\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar7 = iVar7 + iVar4;\n            }\n            string = string + sVar6;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&mbstate);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar7 = iVar7 + 1;\n          string = string + 1;\n        }\n      } while (string < pcVar8);\n    }\n  }" if (parenthesized_expression "(uVar3 < 2)" ( (binary_expression "uVar3 < 2" identifier < number_literal) )) (compound_statement "{\n    iVar7 = 0;\n    if (string < pcVar8) {\n      pcVar9 = string + 1;\n      piVar5 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      nbytes = 0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar5 + (uint)(byte)pcVar9[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar7 == 0x7fffffff) break;\n          iVar7 = iVar7 + 1;\n        }\n        bVar1 = pcVar8 != pcVar9;\n        pcVar9 = pcVar9 + 1;\n      } while (bVar1);\n    }\n  }" { (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) (if_statement "if (string < pcVar8) {\n      pcVar9 = string + 1;\n      piVar5 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      nbytes = 0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar5 + (uint)(byte)pcVar9[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar7 == 0x7fffffff) break;\n          iVar7 = iVar7 + 1;\n        }\n        bVar1 = pcVar8 != pcVar9;\n        pcVar9 = pcVar9 + 1;\n      } while (bVar1);\n    }" if (parenthesized_expression "(string < pcVar8)" ( (binary_expression "string < pcVar8" identifier < identifier) )) (compound_statement "{\n      pcVar9 = string + 1;\n      piVar5 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      nbytes = 0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar5 + (uint)(byte)pcVar9[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar7 == 0x7fffffff) break;\n          iVar7 = iVar7 + 1;\n        }\n        bVar1 = pcVar8 != pcVar9;\n        pcVar9 = pcVar9 + 1;\n      } while (bVar1);\n    }" { (expression_statement "pcVar9 = string + 1;" (assignment_expression "pcVar9 = string + 1" identifier = (binary_expression "string + 1" identifier + number_literal)) ;) (expression_statement "piVar5 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();" (assignment_expression "piVar5 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)()" identifier = (cast_expression "(int *)(*(code *)PTR___ctype_b_loc_0003629c)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___ctype_b_loc_0003629c)()" (parenthesized_expression "(*(code *)PTR___ctype_b_loc_0003629c)" ( (pointer_expression "*(code *)PTR___ctype_b_loc_0003629c" * (cast_expression "(code *)PTR___ctype_b_loc_0003629c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "nbytes = 0x7fffffff;" (assignment_expression "nbytes = 0x7fffffff" identifier = number_literal) ;) (do_statement "do {\n        uVar2 = *(ushort *)(*piVar5 + (uint)(byte)pcVar9[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar7 == 0x7fffffff) break;\n          iVar7 = iVar7 + 1;\n        }\n        bVar1 = pcVar8 != pcVar9;\n        pcVar9 = pcVar9 + 1;\n      } while (bVar1);" do (compound_statement "{\n        uVar2 = *(ushort *)(*piVar5 + (uint)(byte)pcVar9[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar7 == 0x7fffffff) break;\n          iVar7 = iVar7 + 1;\n        }\n        bVar1 = pcVar8 != pcVar9;\n        pcVar9 = pcVar9 + 1;\n      }" { (expression_statement "uVar2 = *(ushort *)(*piVar5 + (uint)(byte)pcVar9[-1] * 2);" (assignment_expression "uVar2 = *(ushort *)(*piVar5 + (uint)(byte)pcVar9[-1] * 2)" identifier = (pointer_expression "*(ushort *)(*piVar5 + (uint)(byte)pcVar9[-1] * 2)" * (cast_expression "(ushort *)(*piVar5 + (uint)(byte)pcVar9[-1] * 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar5 + (uint)(byte)pcVar9[-1] * 2)" ( (binary_expression "*piVar5 + (uint)(byte)pcVar9[-1] * 2" (pointer_expression "*piVar5" * identifier) + (binary_expression "(uint)(byte)pcVar9[-1] * 2" (cast_expression "(uint)(byte)pcVar9[-1]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)pcVar9[-1]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "pcVar9[-1]" identifier [ number_literal ]))) * number_literal)) ))))) ;) (if_statement "if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar7 == 0x7fffffff) break;\n          iVar7 = iVar7 + 1;\n        }" if (parenthesized_expression "((uVar2 & 0x40) == 0)" ( (binary_expression "(uVar2 & 0x40) == 0" (parenthesized_expression "(uVar2 & 0x40)" ( (binary_expression "uVar2 & 0x40" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n          if ((flags & 2U) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }" { (if_statement "if ((flags & 2U) != 0) goto LAB_000172f0;" if (parenthesized_expression "((flags & 2U) != 0)" ( (binary_expression "(flags & 2U) != 0" (parenthesized_expression "(flags & 2U)" ( (binary_expression "flags & 2U" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_000172f0;" goto statement_identifier ;)) (if_statement "if ((uVar2 & 0x200) == 0) goto LAB_000172bc;" if (parenthesized_expression "((uVar2 & 0x200) == 0)" ( (binary_expression "(uVar2 & 0x200) == 0" (parenthesized_expression "(uVar2 & 0x200)" ( (binary_expression "uVar2 & 0x200" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_000172bc;" goto statement_identifier ;)) }) (else_clause "else {\nLAB_000172bc:\n          if (iVar7 == 0x7fffffff) break;\n          iVar7 = iVar7 + 1;\n        }" else (compound_statement "{\nLAB_000172bc:\n          if (iVar7 == 0x7fffffff) break;\n          iVar7 = iVar7 + 1;\n        }" { (labeled_statement "LAB_000172bc:\n          if (iVar7 == 0x7fffffff) break;" statement_identifier : (if_statement "if (iVar7 == 0x7fffffff) break;" if (parenthesized_expression "(iVar7 == 0x7fffffff)" ( (binary_expression "iVar7 == 0x7fffffff" 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)) ;) }))) (expression_statement "bVar1 = pcVar8 != pcVar9;" (assignment_expression "bVar1 = pcVar8 != pcVar9" identifier = (binary_expression "pcVar8 != pcVar9" identifier != identifier)) ;) (expression_statement "pcVar9 = pcVar9 + 1;" (assignment_expression "pcVar9 = pcVar9 + 1" identifier = (binary_expression "pcVar9 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar1)" ( identifier )) ;) })) }) (else_clause "else {\n    iVar7 = 0;\n    if (string < pcVar8) {\n      do {\n        iVar4 = (int)*string;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          do {\n            nbytes = (size_t)string;\n            sVar6 = rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate);\n            if (sVar6 == 0xffffffff) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (sVar6 == 0xfffffffe) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              iVar7 = iVar7 + 1;\n              string = pcVar8;\n              break;\n            }\n            if (sVar6 == 0) {\n              sVar6 = 1;\n            }\n            iVar4 = (*(code *)PTR_wcwidth_000363ac)(wc);\n            if (iVar4 < 0) {\n              if ((flags & 2U) != 0) goto LAB_000172f0;\n              iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);\n              if (iVar4 == 0) {\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar7 = iVar7 + iVar4;\n            }\n            string = string + sVar6;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&mbstate);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar7 = iVar7 + 1;\n          string = string + 1;\n        }\n      } while (string < pcVar8);\n    }\n  }" else (compound_statement "{\n    iVar7 = 0;\n    if (string < pcVar8) {\n      do {\n        iVar4 = (int)*string;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          do {\n            nbytes = (size_t)string;\n            sVar6 = rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate);\n            if (sVar6 == 0xffffffff) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (sVar6 == 0xfffffffe) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              iVar7 = iVar7 + 1;\n              string = pcVar8;\n              break;\n            }\n            if (sVar6 == 0) {\n              sVar6 = 1;\n            }\n            iVar4 = (*(code *)PTR_wcwidth_000363ac)(wc);\n            if (iVar4 < 0) {\n              if ((flags & 2U) != 0) goto LAB_000172f0;\n              iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);\n              if (iVar4 == 0) {\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar7 = iVar7 + iVar4;\n            }\n            string = string + sVar6;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&mbstate);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar7 = iVar7 + 1;\n          string = string + 1;\n        }\n      } while (string < pcVar8);\n    }\n  }" { (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) (if_statement "if (string < pcVar8) {\n      do {\n        iVar4 = (int)*string;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          do {\n            nbytes = (size_t)string;\n            sVar6 = rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate);\n            if (sVar6 == 0xffffffff) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (sVar6 == 0xfffffffe) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              iVar7 = iVar7 + 1;\n              string = pcVar8;\n              break;\n            }\n            if (sVar6 == 0) {\n              sVar6 = 1;\n            }\n            iVar4 = (*(code *)PTR_wcwidth_000363ac)(wc);\n            if (iVar4 < 0) {\n              if ((flags & 2U) != 0) goto LAB_000172f0;\n              iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);\n              if (iVar4 == 0) {\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar7 = iVar7 + iVar4;\n            }\n            string = string + sVar6;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&mbstate);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar7 = iVar7 + 1;\n          string = string + 1;\n        }\n      } while (string < pcVar8);\n    }" if (parenthesized_expression "(string < pcVar8)" ( (binary_expression "string < pcVar8" identifier < identifier) )) (compound_statement "{\n      do {\n        iVar4 = (int)*string;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          do {\n            nbytes = (size_t)string;\n            sVar6 = rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate);\n            if (sVar6 == 0xffffffff) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (sVar6 == 0xfffffffe) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              iVar7 = iVar7 + 1;\n              string = pcVar8;\n              break;\n            }\n            if (sVar6 == 0) {\n              sVar6 = 1;\n            }\n            iVar4 = (*(code *)PTR_wcwidth_000363ac)(wc);\n            if (iVar4 < 0) {\n              if ((flags & 2U) != 0) goto LAB_000172f0;\n              iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);\n              if (iVar4 == 0) {\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar7 = iVar7 + iVar4;\n            }\n            string = string + sVar6;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&mbstate);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar7 = iVar7 + 1;\n          string = string + 1;\n        }\n      } while (string < pcVar8);\n    }" { (do_statement "do {\n        iVar4 = (int)*string;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          do {\n            nbytes = (size_t)string;\n            sVar6 = rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate);\n            if (sVar6 == 0xffffffff) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (sVar6 == 0xfffffffe) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              iVar7 = iVar7 + 1;\n              string = pcVar8;\n              break;\n            }\n            if (sVar6 == 0) {\n              sVar6 = 1;\n            }\n            iVar4 = (*(code *)PTR_wcwidth_000363ac)(wc);\n            if (iVar4 < 0) {\n              if ((flags & 2U) != 0) goto LAB_000172f0;\n              iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);\n              if (iVar4 == 0) {\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar7 = iVar7 + iVar4;\n            }\n            string = string + sVar6;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&mbstate);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar7 = iVar7 + 1;\n          string = string + 1;\n        }\n      } while (string < pcVar8);" do (compound_statement "{\n        iVar4 = (int)*string;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          do {\n            nbytes = (size_t)string;\n            sVar6 = rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate);\n            if (sVar6 == 0xffffffff) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (sVar6 == 0xfffffffe) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              iVar7 = iVar7 + 1;\n              string = pcVar8;\n              break;\n            }\n            if (sVar6 == 0) {\n              sVar6 = 1;\n            }\n            iVar4 = (*(code *)PTR_wcwidth_000363ac)(wc);\n            if (iVar4 < 0) {\n              if ((flags & 2U) != 0) goto LAB_000172f0;\n              iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);\n              if (iVar4 == 0) {\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar7 = iVar7 + iVar4;\n            }\n            string = string + sVar6;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&mbstate);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar7 = iVar7 + 1;\n          string = string + 1;\n        }\n      }" { (expression_statement "iVar4 = (int)*string;" (assignment_expression "iVar4 = (int)*string" identifier = (cast_expression "(int)*string" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*string" * identifier))) ;) (if_statement "if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          do {\n            nbytes = (size_t)string;\n            sVar6 = rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate);\n            if (sVar6 == 0xffffffff) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (sVar6 == 0xfffffffe) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              iVar7 = iVar7 + 1;\n              string = pcVar8;\n              break;\n            }\n            if (sVar6 == 0) {\n              sVar6 = 1;\n            }\n            iVar4 = (*(code *)PTR_wcwidth_000363ac)(wc);\n            if (iVar4 < 0) {\n              if ((flags & 2U) != 0) goto LAB_000172f0;\n              iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);\n              if (iVar4 == 0) {\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar7 = iVar7 + iVar4;\n            }\n            string = string + sVar6;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&mbstate);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar7 = iVar7 + 1;\n          string = string + 1;\n        }" if (parenthesized_expression "(iVar4 < 0x40)" ( (binary_expression "iVar4 < 0x40" identifier < number_literal) )) (compound_statement "{\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          do {\n            nbytes = (size_t)string;\n            sVar6 = rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate);\n            if (sVar6 == 0xffffffff) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (sVar6 == 0xfffffffe) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              iVar7 = iVar7 + 1;\n              string = pcVar8;\n              break;\n            }\n            if (sVar6 == 0) {\n              sVar6 = 1;\n            }\n            iVar4 = (*(code *)PTR_wcwidth_000363ac)(wc);\n            if (iVar4 < 0) {\n              if ((flags & 2U) != 0) goto LAB_000172f0;\n              iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);\n              if (iVar4 == 0) {\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar7 = iVar7 + iVar4;\n            }\n            string = string + sVar6;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&mbstate);\n          } while (iVar4 == 0);\n        }" { (if_statement "if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;" if (parenthesized_expression "((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4))" ( (binary_expression "(0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)" (parenthesized_expression "(0x24 < iVar4)" ( (binary_expression "0x24 < iVar4" number_literal < identifier) )) || (parenthesized_expression "((iVar4 - 0x20U & 0xff) < 4)" ( (binary_expression "(iVar4 - 0x20U & 0xff) < 4" (parenthesized_expression "(iVar4 - 0x20U & 0xff)" ( (binary_expression "iVar4 - 0x20U & 0xff" (binary_expression "iVar4 - 0x20U" identifier - number_literal) & number_literal) )) < number_literal) ))) )) (goto_statement "goto LAB_00017130;" goto statement_identifier ;)) (labeled_statement "LAB_000171a8:\n          mbstate.__count = 0;" statement_identifier : (expression_statement "mbstate.__count = 0;" (assignment_expression "mbstate.__count = 0" (field_expression "mbstate.__count" identifier . field_identifier) = number_literal) ;)) (expression_statement "mbstate.__value.__wch = 0;" (assignment_expression "mbstate.__value.__wch = 0" (field_expression "mbstate.__value.__wch" (field_expression "mbstate.__value" identifier . field_identifier) . field_identifier) = number_literal) ;) (do_statement "do {\n            nbytes = (size_t)string;\n            sVar6 = rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate);\n            if (sVar6 == 0xffffffff) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (sVar6 == 0xfffffffe) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              iVar7 = iVar7 + 1;\n              string = pcVar8;\n              break;\n            }\n            if (sVar6 == 0) {\n              sVar6 = 1;\n            }\n            iVar4 = (*(code *)PTR_wcwidth_000363ac)(wc);\n            if (iVar4 < 0) {\n              if ((flags & 2U) != 0) goto LAB_000172f0;\n              iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);\n              if (iVar4 == 0) {\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar7 = iVar7 + iVar4;\n            }\n            string = string + sVar6;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&mbstate);\n          } while (iVar4 == 0);" do (compound_statement "{\n            nbytes = (size_t)string;\n            sVar6 = rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate);\n            if (sVar6 == 0xffffffff) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (sVar6 == 0xfffffffe) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              iVar7 = iVar7 + 1;\n              string = pcVar8;\n              break;\n            }\n            if (sVar6 == 0) {\n              sVar6 = 1;\n            }\n            iVar4 = (*(code *)PTR_wcwidth_000363ac)(wc);\n            if (iVar4 < 0) {\n              if ((flags & 2U) != 0) goto LAB_000172f0;\n              iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);\n              if (iVar4 == 0) {\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar7 = iVar7 + iVar4;\n            }\n            string = string + sVar6;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&mbstate);\n          }" { (expression_statement "nbytes = (size_t)string;" (assignment_expression "nbytes = (size_t)string" identifier = (cast_expression "(size_t)string" ( (type_descriptor "size_t" primitive_type) ) identifier)) ;) (expression_statement "sVar6 = rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate);" (assignment_expression "sVar6 = rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate)" identifier = (call_expression "rpl_mbrtowc(&wc,string,(int)pcVar8 - (int)string,&mbstate)" identifier (argument_list "(&wc,string,(int)pcVar8 - (int)string,&mbstate)" ( (pointer_expression "&wc" & identifier) , identifier , (binary_expression "(int)pcVar8 - (int)string" (cast_expression "(int)pcVar8" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)string" ( (type_descriptor "int" primitive_type) ) identifier)) , (pointer_expression "&mbstate" & identifier) )))) ;) (if_statement "if (sVar6 == 0xffffffff) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }" if (parenthesized_expression "(sVar6 == 0xffffffff)" ( (binary_expression "sVar6 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }" { (if_statement "if ((flags & 1U) != 0) goto LAB_000172f0;" if (parenthesized_expression "((flags & 1U) != 0)" ( (binary_expression "(flags & 1U) != 0" (parenthesized_expression "(flags & 1U)" ( (binary_expression "flags & 1U" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_000172f0;" goto statement_identifier ;)) (goto_statement "goto LAB_00017130;" goto statement_identifier ;) })) (if_statement "if (sVar6 == 0xfffffffe) {\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              iVar7 = iVar7 + 1;\n              string = pcVar8;\n              break;\n            }" if (parenthesized_expression "(sVar6 == 0xfffffffe)" ( (binary_expression "sVar6 == 0xfffffffe" identifier == number_literal) )) (compound_statement "{\n              if ((flags & 1U) != 0) goto LAB_000172f0;\n              iVar7 = iVar7 + 1;\n              string = pcVar8;\n              break;\n            }" { (if_statement "if ((flags & 1U) != 0) goto LAB_000172f0;" if (parenthesized_expression "((flags & 1U) != 0)" ( (binary_expression "(flags & 1U) != 0" (parenthesized_expression "(flags & 1U)" ( (binary_expression "flags & 1U" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_000172f0;" goto statement_identifier ;)) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) (expression_statement "string = pcVar8;" (assignment_expression "string = pcVar8" identifier = identifier) ;) (break_statement "break;" break ;) })) (if_statement "if (sVar6 == 0) {\n              sVar6 = 1;\n            }" if (parenthesized_expression "(sVar6 == 0)" ( (binary_expression "sVar6 == 0" identifier == number_literal) )) (compound_statement "{\n              sVar6 = 1;\n            }" { (expression_statement "sVar6 = 1;" (assignment_expression "sVar6 = 1" identifier = number_literal) ;) })) (expression_statement "iVar4 = (*(code *)PTR_wcwidth_000363ac)(wc);" (assignment_expression "iVar4 = (*(code *)PTR_wcwidth_000363ac)(wc)" identifier = (call_expression "(*(code *)PTR_wcwidth_000363ac)(wc)" (parenthesized_expression "(*(code *)PTR_wcwidth_000363ac)" ( (pointer_expression "*(code *)PTR_wcwidth_000363ac" * (cast_expression "(code *)PTR_wcwidth_000363ac" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(wc)" ( identifier )))) ;) (if_statement "if (iVar4 < 0) {\n              if ((flags & 2U) != 0) goto LAB_000172f0;\n              iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);\n              if (iVar4 == 0) {\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar7 = iVar7 + iVar4;\n            }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n              if ((flags & 2U) != 0) goto LAB_000172f0;\n              iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);\n              if (iVar4 == 0) {\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }\n            }" { (if_statement "if ((flags & 2U) != 0) goto LAB_000172f0;" if (parenthesized_expression "((flags & 2U) != 0)" ( (binary_expression "(flags & 2U) != 0" (parenthesized_expression "(flags & 2U)" ( (binary_expression "flags & 2U" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_000172f0;" goto statement_identifier ;)) (expression_statement "iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc);" (assignment_expression "iVar4 = (*(code *)PTR_iswcntrl_0003637c)(wc)" identifier = (call_expression "(*(code *)PTR_iswcntrl_0003637c)(wc)" (parenthesized_expression "(*(code *)PTR_iswcntrl_0003637c)" ( (pointer_expression "*(code *)PTR_iswcntrl_0003637c" * (cast_expression "(code *)PTR_iswcntrl_0003637c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(wc)" ( identifier )))) ;) (if_statement "if (iVar4 == 0) {\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n                if (iVar7 == 0x7fffffff) goto LAB_00017314;\n                iVar7 = iVar7 + 1;\n              }" { (if_statement "if (iVar7 == 0x7fffffff) goto LAB_00017314;" if (parenthesized_expression "(iVar7 == 0x7fffffff)" ( (binary_expression "iVar7 == 0x7fffffff" identifier == number_literal) )) (goto_statement "goto LAB_00017314;" goto statement_identifier ;)) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) })) }) (else_clause "else {\n              if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar7 = iVar7 + iVar4;\n            }" else (compound_statement "{\n              if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar7 = iVar7 + iVar4;\n            }" { (if_statement "if (0x7fffffff - iVar7 < iVar4) {\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }" if (parenthesized_expression "(0x7fffffff - iVar7 < iVar4)" ( (binary_expression "0x7fffffff - iVar7 < iVar4" (binary_expression "0x7fffffff - iVar7" number_literal - identifier) < identifier) )) (compound_statement "{\nLAB_00017314:\n                iVar7 = 0x7fffffff;\n                goto LAB_00017144;\n              }" { (labeled_statement "LAB_00017314:\n                iVar7 = 0x7fffffff;" statement_identifier : (expression_statement "iVar7 = 0x7fffffff;" (assignment_expression "iVar7 = 0x7fffffff" identifier = number_literal) ;)) (goto_statement "goto LAB_00017144;" goto statement_identifier ;) })) (expression_statement "iVar7 = iVar7 + iVar4;" (assignment_expression "iVar7 = iVar7 + iVar4" identifier = (binary_expression "iVar7 + iVar4" identifier + identifier)) ;) }))) (expression_statement "string = string + sVar6;" (assignment_expression "string = string + sVar6" identifier = (binary_expression "string + sVar6" identifier + identifier)) ;) (expression_statement "iVar4 = (*(code *)PTR_mbsinit_0003639c)(&mbstate);" (assignment_expression "iVar4 = (*(code *)PTR_mbsinit_0003639c)(&mbstate)" identifier = (call_expression "(*(code *)PTR_mbsinit_0003639c)(&mbstate)" (parenthesized_expression "(*(code *)PTR_mbsinit_0003639c)" ( (pointer_expression "*(code *)PTR_mbsinit_0003639c" * (cast_expression "(code *)PTR_mbsinit_0003639c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(&mbstate)" ( (pointer_expression "&mbstate" & identifier) )))) ;) }) while (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) ;) }) (else_clause "else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar7 = iVar7 + 1;\n          string = string + 1;\n        }" else (compound_statement "{\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar7 = iVar7 + 1;\n          string = string + 1;\n        }" { (if_statement "if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;" if (parenthesized_expression "((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))" ( (binary_expression "(iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff))))" (parenthesized_expression "(iVar4 < 0x41)" ( (binary_expression "iVar4 < 0x41" identifier < number_literal) )) || (parenthesized_expression "((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff))))" ( (parenthesized_expression "(0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))" ( (binary_expression "0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff))" (binary_expression "0x5f < iVar4" number_literal < identifier) && (parenthesized_expression "(0x1d < (iVar4 - 0x61U & 0xff))" ( (binary_expression "0x1d < (iVar4 - 0x61U & 0xff)" number_literal < (parenthesized_expression "(iVar4 - 0x61U & 0xff)" ( (binary_expression "iVar4 - 0x61U & 0xff" (binary_expression "iVar4 - 0x61U" identifier - number_literal) & number_literal) ))) ))) )) ))) )) (goto_statement "goto LAB_000171a8;" goto statement_identifier ;)) (labeled_statement "LAB_00017130:\n          iVar7 = iVar7 + 1;" statement_identifier : (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;)) (expression_statement "string = string + 1;" (assignment_expression "string = string + 1" identifier = (binary_expression "string + 1" identifier + number_literal)) ;) }))) }) while (parenthesized_expression "(string < pcVar8)" ( (binary_expression "string < pcVar8" identifier < identifier) )) ;) })) }))) (labeled_statement "LAB_00017144:\n  if (string_00 != *(char **)puVar10) {\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    sVar6 = (**(code **)(puVar10 + 0x1f004))();\n    iVar7 = mbsnwidth(string_00,sVar6,nbytes);\n    return iVar7;\n  }" statement_identifier : (if_statement "if (string_00 != *(char **)puVar10) {\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    sVar6 = (**(code **)(puVar10 + 0x1f004))();\n    iVar7 = mbsnwidth(string_00,sVar6,nbytes);\n    return iVar7;\n  }" if (parenthesized_expression "(string_00 != *(char **)puVar10)" ( (binary_expression "string_00 != *(char **)puVar10" identifier != (pointer_expression "*(char **)puVar10" * (cast_expression "(char **)puVar10" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) )) (compound_statement "{\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    sVar6 = (**(code **)(puVar10 + 0x1f004))();\n    iVar7 = mbsnwidth(string_00,sVar6,nbytes);\n    return iVar7;\n  }" { (expression_statement "puVar10 = PTR___stack_chk_fail_00036384;" (assignment_expression "puVar10 = PTR___stack_chk_fail_00036384" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_00036384)();" (call_expression "(*(code *)PTR___stack_chk_fail_00036384)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00036384)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00036384" * (cast_expression "(code *)PTR___stack_chk_fail_00036384" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "sVar6 = (**(code **)(puVar10 + 0x1f004))();" (assignment_expression "sVar6 = (**(code **)(puVar10 + 0x1f004))()" identifier = (call_expression "(**(code **)(puVar10 + 0x1f004))()" (parenthesized_expression "(**(code **)(puVar10 + 0x1f004))" ( (pointer_expression "**(code **)(puVar10 + 0x1f004)" * (pointer_expression "*(code **)(puVar10 + 0x1f004)" * (cast_expression "(code **)(puVar10 + 0x1f004)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x1f004)" ( (binary_expression "puVar10 + 0x1f004" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (expression_statement "iVar7 = mbsnwidth(string_00,sVar6,nbytes);" (assignment_expression "iVar7 = mbsnwidth(string_00,sVar6,nbytes)" identifier = (call_expression "mbsnwidth(string_00,sVar6,nbytes)" identifier (argument_list "(string_00,sVar6,nbytes)" ( identifier , identifier , identifier )))) ;) (return_statement "return iVar7;" return identifier ;) }))) (return_statement "return iVar7;" return identifier ;) (labeled_statement "LAB_000172f0:\n  iVar7 = -1;" statement_identifier : (expression_statement "iVar7 = -1;" (assignment_expression "iVar7 = -1" identifier = number_literal) ;)) (goto_statement "goto LAB_00017144;" goto statement_identifier ;) })))
(translation_unit "int mbsnwidth(char *param_1,char *param_2,uint param_3)\n\n{\n  bool bVar1;\n  ushort uVar2;\n  uint uVar3;\n  int iVar4;\n  int iVar5;\n  int *piVar6;\n  undefined4 uVar7;\n  int iVar8;\n  char *pcVar9;\n  undefined *puVar10;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar10 = PTR___stack_chk_guard_000363a0;\n  pcVar9 = param_1 + (int)param_2;\n  local_2c = *(int *)PTR___stack_chk_guard_000363a0;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();\n  if (uVar3 < 2) {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }\n  }\n  else {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }\n  }\nLAB_00017144:\n  if (local_2c != *(int *)puVar10) {\n    iVar8 = local_2c;\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    uVar7 = (**(code **)(puVar10 + 0x1f004))();\n    iVar8 = mbsnwidth(iVar8,uVar7,param_2);\n    return iVar8;\n  }\n  return iVar8;\nLAB_000172f0:\n  iVar8 = -1;\n  goto LAB_00017144;\n}\n\n" (function_definition "int mbsnwidth(char *param_1,char *param_2,uint param_3)\n\n{\n  bool bVar1;\n  ushort uVar2;\n  uint uVar3;\n  int iVar4;\n  int iVar5;\n  int *piVar6;\n  undefined4 uVar7;\n  int iVar8;\n  char *pcVar9;\n  undefined *puVar10;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar10 = PTR___stack_chk_guard_000363a0;\n  pcVar9 = param_1 + (int)param_2;\n  local_2c = *(int *)PTR___stack_chk_guard_000363a0;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();\n  if (uVar3 < 2) {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }\n  }\n  else {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }\n  }\nLAB_00017144:\n  if (local_2c != *(int *)puVar10) {\n    iVar8 = local_2c;\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    uVar7 = (**(code **)(puVar10 + 0x1f004))();\n    iVar8 = mbsnwidth(iVar8,uVar7,param_2);\n    return iVar8;\n  }\n  return iVar8;\nLAB_000172f0:\n  iVar8 = -1;\n  goto LAB_00017144;\n}" primitive_type (function_declarator "mbsnwidth(char *param_1,char *param_2,uint param_3)" identifier (parameter_list "(char *param_1,char *param_2,uint param_3)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  bool bVar1;\n  ushort uVar2;\n  uint uVar3;\n  int iVar4;\n  int iVar5;\n  int *piVar6;\n  undefined4 uVar7;\n  int iVar8;\n  char *pcVar9;\n  undefined *puVar10;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar10 = PTR___stack_chk_guard_000363a0;\n  pcVar9 = param_1 + (int)param_2;\n  local_2c = *(int *)PTR___stack_chk_guard_000363a0;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();\n  if (uVar3 < 2) {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }\n  }\n  else {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }\n  }\nLAB_00017144:\n  if (local_2c != *(int *)puVar10) {\n    iVar8 = local_2c;\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    uVar7 = (**(code **)(puVar10 + 0x1f004))();\n    iVar8 = mbsnwidth(iVar8,uVar7,param_2);\n    return iVar8;\n  }\n  return iVar8;\nLAB_000172f0:\n  iVar8 = -1;\n  goto LAB_00017144;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "ushort uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (declaration "undefined4 uVar7;" type_identifier identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "char *pcVar9;" primitive_type (pointer_declarator "*pcVar9" * identifier) ;) (declaration "undefined *puVar10;" type_identifier (pointer_declarator "*puVar10" * 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 "puVar10 = PTR___stack_chk_guard_000363a0;" (assignment_expression "puVar10 = PTR___stack_chk_guard_000363a0" identifier = identifier) ;) (expression_statement "pcVar9 = param_1 + (int)param_2;" (assignment_expression "pcVar9 = param_1 + (int)param_2" identifier = (binary_expression "param_1 + (int)param_2" identifier + (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "local_2c = *(int *)PTR___stack_chk_guard_000363a0;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_000363a0" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000363a0" * (cast_expression "(int *)PTR___stack_chk_guard_000363a0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();" (assignment_expression "uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)()" identifier = (call_expression "(*(code *)PTR___ctype_get_mb_cur_max_00036364)()" (parenthesized_expression "(*(code *)PTR___ctype_get_mb_cur_max_00036364)" ( (pointer_expression "*(code *)PTR___ctype_get_mb_cur_max_00036364" * (cast_expression "(code *)PTR___ctype_get_mb_cur_max_00036364" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (uVar3 < 2) {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }\n  }\n  else {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }\n  }" if (parenthesized_expression "(uVar3 < 2)" ( (binary_expression "uVar3 < 2" identifier < number_literal) )) (compound_statement "{\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }\n  }" { (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) (if_statement "if (param_1 < pcVar9) {\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }" if (parenthesized_expression "(param_1 < pcVar9)" ( (binary_expression "param_1 < pcVar9" identifier < identifier) )) (compound_statement "{\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }" { (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();" (assignment_expression "piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)()" identifier = (cast_expression "(int *)(*(code *)PTR___ctype_b_loc_0003629c)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___ctype_b_loc_0003629c)()" (parenthesized_expression "(*(code *)PTR___ctype_b_loc_0003629c)" ( (pointer_expression "*(code *)PTR___ctype_b_loc_0003629c" * (cast_expression "(code *)PTR___ctype_b_loc_0003629c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "param_2 = (char *)0x7fffffff;" (assignment_expression "param_2 = (char *)0x7fffffff" identifier = (cast_expression "(char *)0x7fffffff" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (do_statement "do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);" do (compound_statement "{\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      }" { (expression_statement "uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);" (assignment_expression "uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2)" identifier = (pointer_expression "*(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2)" * (cast_expression "(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar6 + (uint)(byte)param_1[-1] * 2)" ( (binary_expression "*piVar6 + (uint)(byte)param_1[-1] * 2" (pointer_expression "*piVar6" * identifier) + (binary_expression "(uint)(byte)param_1[-1] * 2" (cast_expression "(uint)(byte)param_1[-1]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)param_1[-1]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "param_1[-1]" identifier [ number_literal ]))) * number_literal)) ))))) ;) (if_statement "if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }" if (parenthesized_expression "((uVar2 & 0x40) == 0)" ( (binary_expression "(uVar2 & 0x40) == 0" (parenthesized_expression "(uVar2 & 0x40)" ( (binary_expression "uVar2 & 0x40" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }" { (if_statement "if ((param_3 & 2) != 0) goto LAB_000172f0;" if (parenthesized_expression "((param_3 & 2) != 0)" ( (binary_expression "(param_3 & 2) != 0" (parenthesized_expression "(param_3 & 2)" ( (binary_expression "param_3 & 2" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_000172f0;" goto statement_identifier ;)) (if_statement "if ((uVar2 & 0x200) == 0) goto LAB_000172bc;" if (parenthesized_expression "((uVar2 & 0x200) == 0)" ( (binary_expression "(uVar2 & 0x200) == 0" (parenthesized_expression "(uVar2 & 0x200)" ( (binary_expression "uVar2 & 0x200" identifier & number_literal) )) == number_literal) )) (goto_statement "goto LAB_000172bc;" goto statement_identifier ;)) }) (else_clause "else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }" else (compound_statement "{\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }" { (labeled_statement "LAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;" statement_identifier : (if_statement "if (iVar8 == 0x7fffffff) break;" if (parenthesized_expression "(iVar8 == 0x7fffffff)" ( (binary_expression "iVar8 == 0x7fffffff" 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)) ;) }))) (expression_statement "bVar1 = pcVar9 != param_1;" (assignment_expression "bVar1 = pcVar9 != param_1" identifier = (binary_expression "pcVar9 != param_1" identifier != identifier)) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar1)" ( identifier )) ;) })) }) (else_clause "else {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }\n  }" else (compound_statement "{\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }\n  }" { (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) (if_statement "if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }" if (parenthesized_expression "(param_1 < pcVar9)" ( (binary_expression "param_1 < pcVar9" identifier < identifier) )) (compound_statement "{\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }" { (do_statement "do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);" do (compound_statement "{\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      }" { (expression_statement "iVar4 = (int)*param_1;" (assignment_expression "iVar4 = (int)*param_1" identifier = (cast_expression "(int)*param_1" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }" if (parenthesized_expression "(iVar4 < 0x40)" ( (binary_expression "iVar4 < 0x40" identifier < number_literal) )) (compound_statement "{\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }" { (if_statement "if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;" if (parenthesized_expression "((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4))" ( (binary_expression "(0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)" (parenthesized_expression "(0x24 < iVar4)" ( (binary_expression "0x24 < iVar4" number_literal < identifier) )) || (parenthesized_expression "((iVar4 - 0x20U & 0xff) < 4)" ( (binary_expression "(iVar4 - 0x20U & 0xff) < 4" (parenthesized_expression "(iVar4 - 0x20U & 0xff)" ( (binary_expression "iVar4 - 0x20U & 0xff" (binary_expression "iVar4 - 0x20U" identifier - number_literal) & number_literal) )) < number_literal) ))) )) (goto_statement "goto LAB_00017130;" goto statement_identifier ;)) (labeled_statement "LAB_000171a8:\n          local_34 = 0;" statement_identifier : (expression_statement "local_34 = 0;" (assignment_expression "local_34 = 0" identifier = number_literal) ;)) (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" identifier = number_literal) ;) (do_statement "do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);" do (compound_statement "{\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          }" { (expression_statement "param_2 = param_1;" (assignment_expression "param_2 = param_1" identifier = identifier) ;) (expression_statement "iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);" (assignment_expression "iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34)" identifier = (call_expression "rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34)" identifier (argument_list "(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34)" ( (pointer_expression "&local_38" & identifier) , identifier , (binary_expression "(int)pcVar9 - (int)param_1" (cast_expression "(int)pcVar9" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier)) , (pointer_expression "&local_34" & identifier) )))) ;) (if_statement "if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (compound_statement "{\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }" { (if_statement "if ((param_3 & 1) != 0) goto LAB_000172f0;" if (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_000172f0;" goto statement_identifier ;)) (goto_statement "goto LAB_00017130;" goto statement_identifier ;) })) (if_statement "if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }" if (parenthesized_expression "(iVar4 == -2)" ( (binary_expression "iVar4 == -2" identifier == number_literal) )) (compound_statement "{\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }" { (if_statement "if ((param_3 & 1) != 0) goto LAB_000172f0;" if (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_000172f0;" goto statement_identifier ;)) (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" identifier = (binary_expression "iVar8 + 1" identifier + number_literal)) ;) (expression_statement "param_1 = pcVar9;" (assignment_expression "param_1 = pcVar9" identifier = identifier) ;) (break_statement "break;" break ;) })) (if_statement "if (iVar4 == 0) {\n              iVar4 = 1;\n            }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n              iVar4 = 1;\n            }" { (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) })) (expression_statement "iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);" (assignment_expression "iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38)" identifier = (call_expression "(*(code *)PTR_wcwidth_000363ac)(local_38)" (parenthesized_expression "(*(code *)PTR_wcwidth_000363ac)" ( (pointer_expression "*(code *)PTR_wcwidth_000363ac" * (cast_expression "(code *)PTR_wcwidth_000363ac" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(local_38)" ( identifier )))) ;) (if_statement "if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }" if (parenthesized_expression "(iVar5 < 0)" ( (binary_expression "iVar5 < 0" identifier < number_literal) )) (compound_statement "{\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }" { (if_statement "if ((param_3 & 2) != 0) goto LAB_000172f0;" if (parenthesized_expression "((param_3 & 2) != 0)" ( (binary_expression "(param_3 & 2) != 0" (parenthesized_expression "(param_3 & 2)" ( (binary_expression "param_3 & 2" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_000172f0;" goto statement_identifier ;)) (expression_statement "iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);" (assignment_expression "iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38)" identifier = (call_expression "(*(code *)PTR_iswcntrl_0003637c)(local_38)" (parenthesized_expression "(*(code *)PTR_iswcntrl_0003637c)" ( (pointer_expression "*(code *)PTR_iswcntrl_0003637c" * (cast_expression "(code *)PTR_iswcntrl_0003637c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(local_38)" ( identifier )))) ;) (if_statement "if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }" { (if_statement "if (iVar8 == 0x7fffffff) goto LAB_00017314;" if (parenthesized_expression "(iVar8 == 0x7fffffff)" ( (binary_expression "iVar8 == 0x7fffffff" identifier == number_literal) )) (goto_statement "goto LAB_00017314;" goto statement_identifier ;)) (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" identifier = (binary_expression "iVar8 + 1" identifier + number_literal)) ;) })) }) (else_clause "else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }" else (compound_statement "{\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }" { (if_statement "if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }" if (parenthesized_expression "(0x7fffffff - iVar8 < iVar5)" ( (binary_expression "0x7fffffff - iVar8 < iVar5" (binary_expression "0x7fffffff - iVar8" number_literal - identifier) < identifier) )) (compound_statement "{\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }" { (labeled_statement "LAB_00017314:\n                iVar8 = 0x7fffffff;" statement_identifier : (expression_statement "iVar8 = 0x7fffffff;" (assignment_expression "iVar8 = 0x7fffffff" identifier = number_literal) ;)) (goto_statement "goto LAB_00017144;" goto statement_identifier ;) })) (expression_statement "iVar8 = iVar8 + iVar5;" (assignment_expression "iVar8 = iVar8 + iVar5" identifier = (binary_expression "iVar8 + iVar5" identifier + identifier)) ;) }))) (expression_statement "param_1 = param_1 + iVar4;" (assignment_expression "param_1 = param_1 + iVar4" identifier = (binary_expression "param_1 + iVar4" identifier + identifier)) ;) (expression_statement "iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);" (assignment_expression "iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34)" identifier = (call_expression "(*(code *)PTR_mbsinit_0003639c)(&local_34)" (parenthesized_expression "(*(code *)PTR_mbsinit_0003639c)" ( (pointer_expression "*(code *)PTR_mbsinit_0003639c" * (cast_expression "(code *)PTR_mbsinit_0003639c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(&local_34)" ( (pointer_expression "&local_34" & identifier) )))) ;) }) while (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) ;) }) (else_clause "else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }" else (compound_statement "{\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }" { (if_statement "if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;" if (parenthesized_expression "((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))" ( (binary_expression "(iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff))))" (parenthesized_expression "(iVar4 < 0x41)" ( (binary_expression "iVar4 < 0x41" identifier < number_literal) )) || (parenthesized_expression "((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff))))" ( (parenthesized_expression "(0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))" ( (binary_expression "0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff))" (binary_expression "0x5f < iVar4" number_literal < identifier) && (parenthesized_expression "(0x1d < (iVar4 - 0x61U & 0xff))" ( (binary_expression "0x1d < (iVar4 - 0x61U & 0xff)" number_literal < (parenthesized_expression "(iVar4 - 0x61U & 0xff)" ( (binary_expression "iVar4 - 0x61U & 0xff" (binary_expression "iVar4 - 0x61U" identifier - number_literal) & number_literal) ))) ))) )) ))) )) (goto_statement "goto LAB_000171a8;" goto statement_identifier ;)) (labeled_statement "LAB_00017130:\n          iVar8 = iVar8 + 1;" statement_identifier : (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" identifier = (binary_expression "iVar8 + 1" identifier + number_literal)) ;)) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) }))) }) while (parenthesized_expression "(param_1 < pcVar9)" ( (binary_expression "param_1 < pcVar9" identifier < identifier) )) ;) })) }))) (labeled_statement "LAB_00017144:\n  if (local_2c != *(int *)puVar10) {\n    iVar8 = local_2c;\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    uVar7 = (**(code **)(puVar10 + 0x1f004))();\n    iVar8 = mbsnwidth(iVar8,uVar7,param_2);\n    return iVar8;\n  }" statement_identifier : (if_statement "if (local_2c != *(int *)puVar10) {\n    iVar8 = local_2c;\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    uVar7 = (**(code **)(puVar10 + 0x1f004))();\n    iVar8 = mbsnwidth(iVar8,uVar7,param_2);\n    return iVar8;\n  }" if (parenthesized_expression "(local_2c != *(int *)puVar10)" ( (binary_expression "local_2c != *(int *)puVar10" identifier != (pointer_expression "*(int *)puVar10" * (cast_expression "(int *)puVar10" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    iVar8 = local_2c;\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    uVar7 = (**(code **)(puVar10 + 0x1f004))();\n    iVar8 = mbsnwidth(iVar8,uVar7,param_2);\n    return iVar8;\n  }" { (expression_statement "iVar8 = local_2c;" (assignment_expression "iVar8 = local_2c" identifier = identifier) ;) (expression_statement "puVar10 = PTR___stack_chk_fail_00036384;" (assignment_expression "puVar10 = PTR___stack_chk_fail_00036384" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_00036384)();" (call_expression "(*(code *)PTR___stack_chk_fail_00036384)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00036384)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00036384" * (cast_expression "(code *)PTR___stack_chk_fail_00036384" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "uVar7 = (**(code **)(puVar10 + 0x1f004))();" (assignment_expression "uVar7 = (**(code **)(puVar10 + 0x1f004))()" identifier = (call_expression "(**(code **)(puVar10 + 0x1f004))()" (parenthesized_expression "(**(code **)(puVar10 + 0x1f004))" ( (pointer_expression "**(code **)(puVar10 + 0x1f004)" * (pointer_expression "*(code **)(puVar10 + 0x1f004)" * (cast_expression "(code **)(puVar10 + 0x1f004)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x1f004)" ( (binary_expression "puVar10 + 0x1f004" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (expression_statement "iVar8 = mbsnwidth(iVar8,uVar7,param_2);" (assignment_expression "iVar8 = mbsnwidth(iVar8,uVar7,param_2)" identifier = (call_expression "mbsnwidth(iVar8,uVar7,param_2)" identifier (argument_list "(iVar8,uVar7,param_2)" ( identifier , identifier , identifier )))) ;) (return_statement "return iVar8;" return identifier ;) }))) (return_statement "return iVar8;" return identifier ;) (labeled_statement "LAB_000172f0:\n  iVar8 = -1;" statement_identifier : (expression_statement "iVar8 = -1;" (assignment_expression "iVar8 = -1" identifier = number_literal) ;)) (goto_statement "goto LAB_00017144;" goto statement_identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + (binary_expression (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) * LIT)) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT != IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( IDENT )) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) || (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) & LIT) )) < LIT) ))) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (goto_statement goto statement_identifier ;)) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (break_statement break ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (binary_expression LIT - IDENT) < IDENT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) }))) (expression_statement (assignment_expression IDENT = (binary_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 ( (pointer_expression & IDENT) )))) ;) }) while (parenthesized_expression ( (binary_expression IDENT == LIT) )) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < LIT) )) || (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression LIT < IDENT) && (parenthesized_expression ( (binary_expression LIT < (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) & LIT) ))) ))) )) ))) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) }) while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) ;) })) }))) (labeled_statement statement_identifier : (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 (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (return_statement return IDENT ;) }))) (return_statement return IDENT ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (goto_statement goto statement_identifier ;) })))
(function_definition "int mbsnwidth(char *param_1,char *param_2,uint param_3)\n\n{\n  bool bVar1;\n  ushort uVar2;\n  uint uVar3;\n  int iVar4;\n  int iVar5;\n  int *piVar6;\n  undefined4 uVar7;\n  int iVar8;\n  char *pcVar9;\n  undefined *puVar10;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar10 = PTR___stack_chk_guard_000363a0;\n  pcVar9 = param_1 + (int)param_2;\n  local_2c = *(int *)PTR___stack_chk_guard_000363a0;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();\n  if (uVar3 < 2) {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }\n  }\n  else {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }\n  }\nLAB_00017144:\n  if (local_2c != *(int *)puVar10) {\n    iVar8 = local_2c;\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    uVar7 = (**(code **)(puVar10 + 0x1f004))();\n    iVar8 = mbsnwidth(iVar8,uVar7,param_2);\n    return iVar8;\n  }\n  return iVar8;\nLAB_000172f0:\n  iVar8 = -1;\n  goto LAB_00017144;\n}" (primitive_type "int") (function_declarator "mbsnwidth(char *param_1,char *param_2,uint param_3)" (identifier "mbsnwidth") (parameter_list "(char *param_1,char *param_2,uint param_3)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")"))) (compound_statement "{\n  bool bVar1;\n  ushort uVar2;\n  uint uVar3;\n  int iVar4;\n  int iVar5;\n  int *piVar6;\n  undefined4 uVar7;\n  int iVar8;\n  char *pcVar9;\n  undefined *puVar10;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar10 = PTR___stack_chk_guard_000363a0;\n  pcVar9 = param_1 + (int)param_2;\n  local_2c = *(int *)PTR___stack_chk_guard_000363a0;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();\n  if (uVar3 < 2) {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }\n  }\n  else {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }\n  }\nLAB_00017144:\n  if (local_2c != *(int *)puVar10) {\n    iVar8 = local_2c;\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    uVar7 = (**(code **)(puVar10 + 0x1f004))();\n    iVar8 = mbsnwidth(iVar8,uVar7,param_2);\n    return iVar8;\n  }\n  return iVar8;\nLAB_000172f0:\n  iVar8 = -1;\n  goto LAB_00017144;\n}" ({ "{") (declaration "bool bVar1;" (primitive_type "bool") (identifier "bVar1") (; ";")) (declaration "ushort uVar2;" (type_identifier "ushort") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int *piVar6;" (primitive_type "int") (pointer_declarator "*piVar6" (* "*") (identifier "piVar6")) (; ";")) (declaration "undefined4 uVar7;" (type_identifier "undefined4") (identifier "uVar7") (; ";")) (declaration "int iVar8;" (primitive_type "int") (identifier "iVar8") (; ";")) (declaration "char *pcVar9;" (primitive_type "char") (pointer_declarator "*pcVar9" (* "*") (identifier "pcVar9")) (; ";")) (declaration "undefined *puVar10;" (type_identifier "undefined") (pointer_declarator "*puVar10" (* "*") (identifier "puVar10")) (; ";")) (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 "puVar10 = PTR___stack_chk_guard_000363a0;" (assignment_expression "puVar10 = PTR___stack_chk_guard_000363a0" (identifier "puVar10") (= "=") (identifier "PTR___stack_chk_guard_000363a0")) (; ";")) (expression_statement "pcVar9 = param_1 + (int)param_2;" (assignment_expression "pcVar9 = param_1 + (int)param_2" (identifier "pcVar9") (= "=") (binary_expression "param_1 + (int)param_2" (identifier "param_1") (+ "+") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")))) (; ";")) (expression_statement "local_2c = *(int *)PTR___stack_chk_guard_000363a0;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_000363a0" (identifier "local_2c") (= "=") (pointer_expression "*(int *)PTR___stack_chk_guard_000363a0" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_000363a0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_000363a0")))) (; ";")) (expression_statement "uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();" (assignment_expression "uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)()" (identifier "uVar3") (= "=") (call_expression "(*(code *)PTR___ctype_get_mb_cur_max_00036364)()" (parenthesized_expression "(*(code *)PTR___ctype_get_mb_cur_max_00036364)" (( "(") (pointer_expression "*(code *)PTR___ctype_get_mb_cur_max_00036364" (* "*") (cast_expression "(code *)PTR___ctype_get_mb_cur_max_00036364" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___ctype_get_mb_cur_max_00036364"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (uVar3 < 2) {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }\n  }\n  else {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }\n  }" (if "if") (parenthesized_expression "(uVar3 < 2)" (( "(") (binary_expression "uVar3 < 2" (identifier "uVar3") (< "<") (number_literal "2")) () ")")) (compound_statement "{\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }\n  }" ({ "{") (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" (identifier "iVar8") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_1 < pcVar9) {\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }" (if "if") (parenthesized_expression "(param_1 < pcVar9)" (( "(") (binary_expression "param_1 < pcVar9" (identifier "param_1") (< "<") (identifier "pcVar9")) () ")")) (compound_statement "{\n      param_1 = param_1 + 1;\n      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();\n      param_2 = (char *)0x7fffffff;\n      do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);\n    }" ({ "{") (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" (identifier "param_1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();" (assignment_expression "piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)()" (identifier "piVar6") (= "=") (cast_expression "(int *)(*(code *)PTR___ctype_b_loc_0003629c)()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___ctype_b_loc_0003629c)()" (parenthesized_expression "(*(code *)PTR___ctype_b_loc_0003629c)" (( "(") (pointer_expression "*(code *)PTR___ctype_b_loc_0003629c" (* "*") (cast_expression "(code *)PTR___ctype_b_loc_0003629c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___ctype_b_loc_0003629c"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "param_2 = (char *)0x7fffffff;" (assignment_expression "param_2 = (char *)0x7fffffff" (identifier "param_2") (= "=") (cast_expression "(char *)0x7fffffff" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x7fffffff"))) (; ";")) (do_statement "do {\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      } while (bVar1);" (do "do") (compound_statement "{\n        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }\n        bVar1 = pcVar9 != param_1;\n        param_1 = param_1 + 1;\n      }" ({ "{") (expression_statement "uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);" (assignment_expression "uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2)" (identifier "uVar2") (= "=") (pointer_expression "*(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2)" (* "*") (cast_expression "(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar6 + (uint)(byte)param_1[-1] * 2)" (( "(") (binary_expression "*piVar6 + (uint)(byte)param_1[-1] * 2" (pointer_expression "*piVar6" (* "*") (identifier "piVar6")) (+ "+") (binary_expression "(uint)(byte)param_1[-1] * 2" (cast_expression "(uint)(byte)param_1[-1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (cast_expression "(byte)param_1[-1]" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (subscript_expression "param_1[-1]" (identifier "param_1") ([ "[") (number_literal "-1") (] "]")))) (* "*") (number_literal "2"))) () ")"))))) (; ";")) (if_statement "if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }\n        else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }" (if "if") (parenthesized_expression "((uVar2 & 0x40) == 0)" (( "(") (binary_expression "(uVar2 & 0x40) == 0" (parenthesized_expression "(uVar2 & 0x40)" (( "(") (binary_expression "uVar2 & 0x40" (identifier "uVar2") (& "&") (number_literal "0x40")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          if ((param_3 & 2) != 0) goto LAB_000172f0;\n          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;\n        }" ({ "{") (if_statement "if ((param_3 & 2) != 0) goto LAB_000172f0;" (if "if") (parenthesized_expression "((param_3 & 2) != 0)" (( "(") (binary_expression "(param_3 & 2) != 0" (parenthesized_expression "(param_3 & 2)" (( "(") (binary_expression "param_3 & 2" (identifier "param_3") (& "&") (number_literal "2")) () ")")) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_000172f0;" (goto "goto") (statement_identifier "LAB_000172f0") (; ";"))) (if_statement "if ((uVar2 & 0x200) == 0) goto LAB_000172bc;" (if "if") (parenthesized_expression "((uVar2 & 0x200) == 0)" (( "(") (binary_expression "(uVar2 & 0x200) == 0" (parenthesized_expression "(uVar2 & 0x200)" (( "(") (binary_expression "uVar2 & 0x200" (identifier "uVar2") (& "&") (number_literal "0x200")) () ")")) (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_000172bc;" (goto "goto") (statement_identifier "LAB_000172bc") (; ";"))) (} "}")) (else_clause "else {\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }" (else "else") (compound_statement "{\nLAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;\n          iVar8 = iVar8 + 1;\n        }" ({ "{") (labeled_statement "LAB_000172bc:\n          if (iVar8 == 0x7fffffff) break;" (statement_identifier "LAB_000172bc") (: ":") (if_statement "if (iVar8 == 0x7fffffff) break;" (if "if") (parenthesized_expression "(iVar8 == 0x7fffffff)" (( "(") (binary_expression "iVar8 == 0x7fffffff" (identifier "iVar8") (== "==") (number_literal "0x7fffffff")) () ")")) (break_statement "break;" (break "break") (; ";")))) (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" (identifier "iVar8") (= "=") (binary_expression "iVar8 + 1" (identifier "iVar8") (+ "+") (number_literal "1"))) (; ";")) (} "}")))) (expression_statement "bVar1 = pcVar9 != param_1;" (assignment_expression "bVar1 = pcVar9 != param_1" (identifier "bVar1") (= "=") (binary_expression "pcVar9 != param_1" (identifier "pcVar9") (!= "!=") (identifier "param_1"))) (; ";")) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" (identifier "param_1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar1)" (( "(") (identifier "bVar1") () ")")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }\n  }" (else "else") (compound_statement "{\n    iVar8 = 0;\n    if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }\n  }" ({ "{") (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" (identifier "iVar8") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_1 < pcVar9) {\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }" (if "if") (parenthesized_expression "(param_1 < pcVar9)" (( "(") (binary_expression "param_1 < pcVar9" (identifier "param_1") (< "<") (identifier "pcVar9")) () ")")) (compound_statement "{\n      do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);\n    }" ({ "{") (do_statement "do {\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      } while (param_1 < pcVar9);" (do "do") (compound_statement "{\n        iVar4 = (int)*param_1;\n        if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }\n      }" ({ "{") (expression_statement "iVar4 = (int)*param_1;" (assignment_expression "iVar4 = (int)*param_1" (identifier "iVar4") (= "=") (cast_expression "(int)*param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (if_statement "if (iVar4 < 0x40) {\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }\n        else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }" (if "if") (parenthesized_expression "(iVar4 < 0x40)" (( "(") (binary_expression "iVar4 < 0x40" (identifier "iVar4") (< "<") (number_literal "0x40")) () ")")) (compound_statement "{\n          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;\nLAB_000171a8:\n          local_34 = 0;\n          local_30 = 0;\n          do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);\n        }" ({ "{") (if_statement "if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;" (if "if") (parenthesized_expression "((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4))" (( "(") (binary_expression "(0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)" (parenthesized_expression "(0x24 < iVar4)" (( "(") (binary_expression "0x24 < iVar4" (number_literal "0x24") (< "<") (identifier "iVar4")) () ")")) (|| "||") (parenthesized_expression "((iVar4 - 0x20U & 0xff) < 4)" (( "(") (binary_expression "(iVar4 - 0x20U & 0xff) < 4" (parenthesized_expression "(iVar4 - 0x20U & 0xff)" (( "(") (binary_expression "iVar4 - 0x20U & 0xff" (binary_expression "iVar4 - 0x20U" (identifier "iVar4") (- "-") (number_literal "0x20U")) (& "&") (number_literal "0xff")) () ")")) (< "<") (number_literal "4")) () ")"))) () ")")) (goto_statement "goto LAB_00017130;" (goto "goto") (statement_identifier "LAB_00017130") (; ";"))) (labeled_statement "LAB_000171a8:\n          local_34 = 0;" (statement_identifier "LAB_000171a8") (: ":") (expression_statement "local_34 = 0;" (assignment_expression "local_34 = 0" (identifier "local_34") (= "=") (number_literal "0")) (; ";"))) (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" (identifier "local_30") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          } while (iVar4 == 0);" (do "do") (compound_statement "{\n            param_2 = param_1;\n            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);\n            if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }\n            if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }\n            if (iVar4 == 0) {\n              iVar4 = 1;\n            }\n            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);\n            if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }\n            param_1 = param_1 + iVar4;\n            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);\n          }" ({ "{") (expression_statement "param_2 = param_1;" (assignment_expression "param_2 = param_1" (identifier "param_2") (= "=") (identifier "param_1")) (; ";")) (expression_statement "iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);" (assignment_expression "iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34)" (identifier "iVar4") (= "=") (call_expression "rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34)" (identifier "rpl_mbrtowc") (argument_list "(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34)" (( "(") (pointer_expression "&local_38" (& "&") (identifier "local_38")) (, ",") (identifier "param_1") (, ",") (binary_expression "(int)pcVar9 - (int)param_1" (cast_expression "(int)pcVar9" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pcVar9")) (- "-") (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1"))) (, ",") (pointer_expression "&local_34" (& "&") (identifier "local_34")) () ")")))) (; ";")) (if_statement "if (iVar4 == -1) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }" (if "if") (parenthesized_expression "(iVar4 == -1)" (( "(") (binary_expression "iVar4 == -1" (identifier "iVar4") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              goto LAB_00017130;\n            }" ({ "{") (if_statement "if ((param_3 & 1) != 0) goto LAB_000172f0;" (if "if") (parenthesized_expression "((param_3 & 1) != 0)" (( "(") (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" (( "(") (binary_expression "param_3 & 1" (identifier "param_3") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_000172f0;" (goto "goto") (statement_identifier "LAB_000172f0") (; ";"))) (goto_statement "goto LAB_00017130;" (goto "goto") (statement_identifier "LAB_00017130") (; ";")) (} "}"))) (if_statement "if (iVar4 == -2) {\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }" (if "if") (parenthesized_expression "(iVar4 == -2)" (( "(") (binary_expression "iVar4 == -2" (identifier "iVar4") (== "==") (number_literal "-2")) () ")")) (compound_statement "{\n              if ((param_3 & 1) != 0) goto LAB_000172f0;\n              iVar8 = iVar8 + 1;\n              param_1 = pcVar9;\n              break;\n            }" ({ "{") (if_statement "if ((param_3 & 1) != 0) goto LAB_000172f0;" (if "if") (parenthesized_expression "((param_3 & 1) != 0)" (( "(") (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" (( "(") (binary_expression "param_3 & 1" (identifier "param_3") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_000172f0;" (goto "goto") (statement_identifier "LAB_000172f0") (; ";"))) (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" (identifier "iVar8") (= "=") (binary_expression "iVar8 + 1" (identifier "iVar8") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "param_1 = pcVar9;" (assignment_expression "param_1 = pcVar9" (identifier "param_1") (= "=") (identifier "pcVar9")) (; ";")) (break_statement "break;" (break "break") (; ";")) (} "}"))) (if_statement "if (iVar4 == 0) {\n              iVar4 = 1;\n            }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n              iVar4 = 1;\n            }" ({ "{") (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" (identifier "iVar4") (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);" (assignment_expression "iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38)" (identifier "iVar5") (= "=") (call_expression "(*(code *)PTR_wcwidth_000363ac)(local_38)" (parenthesized_expression "(*(code *)PTR_wcwidth_000363ac)" (( "(") (pointer_expression "*(code *)PTR_wcwidth_000363ac" (* "*") (cast_expression "(code *)PTR_wcwidth_000363ac" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_wcwidth_000363ac"))) () ")")) (argument_list "(local_38)" (( "(") (identifier "local_38") () ")")))) (; ";")) (if_statement "if (iVar5 < 0) {\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }\n            else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }" (if "if") (parenthesized_expression "(iVar5 < 0)" (( "(") (binary_expression "iVar5 < 0" (identifier "iVar5") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n              if ((param_3 & 2) != 0) goto LAB_000172f0;\n              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);\n              if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }\n            }" ({ "{") (if_statement "if ((param_3 & 2) != 0) goto LAB_000172f0;" (if "if") (parenthesized_expression "((param_3 & 2) != 0)" (( "(") (binary_expression "(param_3 & 2) != 0" (parenthesized_expression "(param_3 & 2)" (( "(") (binary_expression "param_3 & 2" (identifier "param_3") (& "&") (number_literal "2")) () ")")) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_000172f0;" (goto "goto") (statement_identifier "LAB_000172f0") (; ";"))) (expression_statement "iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);" (assignment_expression "iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38)" (identifier "iVar5") (= "=") (call_expression "(*(code *)PTR_iswcntrl_0003637c)(local_38)" (parenthesized_expression "(*(code *)PTR_iswcntrl_0003637c)" (( "(") (pointer_expression "*(code *)PTR_iswcntrl_0003637c" (* "*") (cast_expression "(code *)PTR_iswcntrl_0003637c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_iswcntrl_0003637c"))) () ")")) (argument_list "(local_38)" (( "(") (identifier "local_38") () ")")))) (; ";")) (if_statement "if (iVar5 == 0) {\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }" (if "if") (parenthesized_expression "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                if (iVar8 == 0x7fffffff) goto LAB_00017314;\n                iVar8 = iVar8 + 1;\n              }" ({ "{") (if_statement "if (iVar8 == 0x7fffffff) goto LAB_00017314;" (if "if") (parenthesized_expression "(iVar8 == 0x7fffffff)" (( "(") (binary_expression "iVar8 == 0x7fffffff" (identifier "iVar8") (== "==") (number_literal "0x7fffffff")) () ")")) (goto_statement "goto LAB_00017314;" (goto "goto") (statement_identifier "LAB_00017314") (; ";"))) (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" (identifier "iVar8") (= "=") (binary_expression "iVar8 + 1" (identifier "iVar8") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }" (else "else") (compound_statement "{\n              if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }\n              iVar8 = iVar8 + iVar5;\n            }" ({ "{") (if_statement "if (0x7fffffff - iVar8 < iVar5) {\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }" (if "if") (parenthesized_expression "(0x7fffffff - iVar8 < iVar5)" (( "(") (binary_expression "0x7fffffff - iVar8 < iVar5" (binary_expression "0x7fffffff - iVar8" (number_literal "0x7fffffff") (- "-") (identifier "iVar8")) (< "<") (identifier "iVar5")) () ")")) (compound_statement "{\nLAB_00017314:\n                iVar8 = 0x7fffffff;\n                goto LAB_00017144;\n              }" ({ "{") (labeled_statement "LAB_00017314:\n                iVar8 = 0x7fffffff;" (statement_identifier "LAB_00017314") (: ":") (expression_statement "iVar8 = 0x7fffffff;" (assignment_expression "iVar8 = 0x7fffffff" (identifier "iVar8") (= "=") (number_literal "0x7fffffff")) (; ";"))) (goto_statement "goto LAB_00017144;" (goto "goto") (statement_identifier "LAB_00017144") (; ";")) (} "}"))) (expression_statement "iVar8 = iVar8 + iVar5;" (assignment_expression "iVar8 = iVar8 + iVar5" (identifier "iVar8") (= "=") (binary_expression "iVar8 + iVar5" (identifier "iVar8") (+ "+") (identifier "iVar5"))) (; ";")) (} "}")))) (expression_statement "param_1 = param_1 + iVar4;" (assignment_expression "param_1 = param_1 + iVar4" (identifier "param_1") (= "=") (binary_expression "param_1 + iVar4" (identifier "param_1") (+ "+") (identifier "iVar4"))) (; ";")) (expression_statement "iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);" (assignment_expression "iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34)" (identifier "iVar4") (= "=") (call_expression "(*(code *)PTR_mbsinit_0003639c)(&local_34)" (parenthesized_expression "(*(code *)PTR_mbsinit_0003639c)" (( "(") (pointer_expression "*(code *)PTR_mbsinit_0003639c" (* "*") (cast_expression "(code *)PTR_mbsinit_0003639c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_mbsinit_0003639c"))) () ")")) (argument_list "(&local_34)" (( "(") (pointer_expression "&local_34" (& "&") (identifier "local_34")) () ")")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (; ";")) (} "}")) (else_clause "else {\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }" (else "else") (compound_statement "{\n          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;\nLAB_00017130:\n          iVar8 = iVar8 + 1;\n          param_1 = param_1 + 1;\n        }" ({ "{") (if_statement "if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))\n          goto LAB_000171a8;" (if "if") (parenthesized_expression "((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))" (( "(") (binary_expression "(iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff))))" (parenthesized_expression "(iVar4 < 0x41)" (( "(") (binary_expression "iVar4 < 0x41" (identifier "iVar4") (< "<") (number_literal "0x41")) () ")")) (|| "||") (parenthesized_expression "((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff))))" (( "(") (parenthesized_expression "(0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))" (( "(") (binary_expression "0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff))" (binary_expression "0x5f < iVar4" (number_literal "0x5f") (< "<") (identifier "iVar4")) (&& "&&") (parenthesized_expression "(0x1d < (iVar4 - 0x61U & 0xff))" (( "(") (binary_expression "0x1d < (iVar4 - 0x61U & 0xff)" (number_literal "0x1d") (< "<") (parenthesized_expression "(iVar4 - 0x61U & 0xff)" (( "(") (binary_expression "iVar4 - 0x61U & 0xff" (binary_expression "iVar4 - 0x61U" (identifier "iVar4") (- "-") (number_literal "0x61U")) (& "&") (number_literal "0xff")) () ")"))) () ")"))) () ")")) () ")"))) () ")")) (goto_statement "goto LAB_000171a8;" (goto "goto") (statement_identifier "LAB_000171a8") (; ";"))) (labeled_statement "LAB_00017130:\n          iVar8 = iVar8 + 1;" (statement_identifier "LAB_00017130") (: ":") (expression_statement "iVar8 = iVar8 + 1;" (assignment_expression "iVar8 = iVar8 + 1" (identifier "iVar8") (= "=") (binary_expression "iVar8 + 1" (identifier "iVar8") (+ "+") (number_literal "1"))) (; ";"))) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" (identifier "param_1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (} "}")))) (} "}")) (while "while") (parenthesized_expression "(param_1 < pcVar9)" (( "(") (binary_expression "param_1 < pcVar9" (identifier "param_1") (< "<") (identifier "pcVar9")) () ")")) (; ";")) (} "}"))) (} "}")))) (labeled_statement "LAB_00017144:\n  if (local_2c != *(int *)puVar10) {\n    iVar8 = local_2c;\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    uVar7 = (**(code **)(puVar10 + 0x1f004))();\n    iVar8 = mbsnwidth(iVar8,uVar7,param_2);\n    return iVar8;\n  }" (statement_identifier "LAB_00017144") (: ":") (if_statement "if (local_2c != *(int *)puVar10) {\n    iVar8 = local_2c;\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    uVar7 = (**(code **)(puVar10 + 0x1f004))();\n    iVar8 = mbsnwidth(iVar8,uVar7,param_2);\n    return iVar8;\n  }" (if "if") (parenthesized_expression "(local_2c != *(int *)puVar10)" (( "(") (binary_expression "local_2c != *(int *)puVar10" (identifier "local_2c") (!= "!=") (pointer_expression "*(int *)puVar10" (* "*") (cast_expression "(int *)puVar10" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar10")))) () ")")) (compound_statement "{\n    iVar8 = local_2c;\n    puVar10 = PTR___stack_chk_fail_00036384;\n    (*(code *)PTR___stack_chk_fail_00036384)();\n    uVar7 = (**(code **)(puVar10 + 0x1f004))();\n    iVar8 = mbsnwidth(iVar8,uVar7,param_2);\n    return iVar8;\n  }" ({ "{") (expression_statement "iVar8 = local_2c;" (assignment_expression "iVar8 = local_2c" (identifier "iVar8") (= "=") (identifier "local_2c")) (; ";")) (expression_statement "puVar10 = PTR___stack_chk_fail_00036384;" (assignment_expression "puVar10 = PTR___stack_chk_fail_00036384" (identifier "puVar10") (= "=") (identifier "PTR___stack_chk_fail_00036384")) (; ";")) (expression_statement "(*(code *)PTR___stack_chk_fail_00036384)();" (call_expression "(*(code *)PTR___stack_chk_fail_00036384)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00036384)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_00036384" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_00036384" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_00036384"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "uVar7 = (**(code **)(puVar10 + 0x1f004))();" (assignment_expression "uVar7 = (**(code **)(puVar10 + 0x1f004))()" (identifier "uVar7") (= "=") (call_expression "(**(code **)(puVar10 + 0x1f004))()" (parenthesized_expression "(**(code **)(puVar10 + 0x1f004))" (( "(") (pointer_expression "**(code **)(puVar10 + 0x1f004)" (* "*") (pointer_expression "*(code **)(puVar10 + 0x1f004)" (* "*") (cast_expression "(code **)(puVar10 + 0x1f004)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar10 + 0x1f004)" (( "(") (binary_expression "puVar10 + 0x1f004" (identifier "puVar10") (+ "+") (number_literal "0x1f004")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar8 = mbsnwidth(iVar8,uVar7,param_2);" (assignment_expression "iVar8 = mbsnwidth(iVar8,uVar7,param_2)" (identifier "iVar8") (= "=") (call_expression "mbsnwidth(iVar8,uVar7,param_2)" (identifier "mbsnwidth") (argument_list "(iVar8,uVar7,param_2)" (( "(") (identifier "iVar8") (, ",") (identifier "uVar7") (, ",") (identifier "param_2") () ")")))) (; ";")) (return_statement "return iVar8;" (return "return") (identifier "iVar8") (; ";")) (} "}")))) (return_statement "return iVar8;" (return "return") (identifier "iVar8") (; ";")) (labeled_statement "LAB_000172f0:\n  iVar8 = -1;" (statement_identifier "LAB_000172f0") (: ":") (expression_statement "iVar8 = -1;" (assignment_expression "iVar8 = -1" (identifier "iVar8") (= "=") (number_literal "-1")) (; ";"))) (goto_statement "goto LAB_00017144;" (goto "goto") (statement_identifier "LAB_00017144") (; ";")) (} "}")))

int function_1(char *var_1,size_t var_2,int var_6)

{
  bool bVar1;
  type_1 var_5;
  char *var_12;
  type_2 var_3;
  int var_9;
  int *piVar5;
  size_t var_11;
  int var_7;
  char *var_4;
  char *var_8;
  type_3 *var_13;
  type_4 wc;
  type_5 mbstate;
  
  var_13 = PTR___stack_chk_guard_000363a0;
  var_4 = var_1 + var_2;
  var_12 = *(char **)PTR___stack_chk_guard_000363a0;
  var_3 = (*(type_6 *)PTR___ctype_get_mb_cur_max_00036364)();
  if (var_3 < 2) {
    var_7 = 0;
    if (var_1 < var_4) {
      var_8 = var_1 + 1;
      piVar5 = (int *)(*(type_6 *)PTR___ctype_b_loc_0003629c)();
      var_2 = 0x7fffffff;
      do {
        var_5 = *(type_1 *)(*piVar5 + (type_2)(type_7)var_8[-1] * 2);
        if ((var_5 & 0x40) == 0) {
          if ((var_6 & 2U) != 0) goto LAB_000172f0;
          if ((var_5 & 0x200) == 0) goto LAB_000172bc;
        }
        else {
LAB_000172bc:
          if (var_7 == 0x7fffffff) break;
          var_7 = var_7 + 1;
        }
        bVar1 = var_4 != var_8;
        var_8 = var_8 + 1;
      } while (bVar1);
    }
  }
  else {
    var_7 = 0;
    if (var_1 < var_4) {
      do {
        var_9 = (int)*var_1;
        if (var_9 < 0x40) {
          if ((0x24 < var_9) || ((var_9 - 0x20U & 0xff) < 4)) goto LAB_00017130;
LAB_000171a8:
          mbstate.__count = 0;
          mbstate.__value.__wch = 0;
          do {
            var_2 = (size_t)var_1;
            var_11 = var_10(&wc,var_1,(int)var_4 - (int)var_1,&mbstate);
            if (var_11 == 0xffffffff) {
              if ((var_6 & 1U) != 0) goto LAB_000172f0;
              goto LAB_00017130;
            }
            if (var_11 == 0xfffffffe) {
              if ((var_6 & 1U) != 0) goto LAB_000172f0;
              var_7 = var_7 + 1;
              var_1 = var_4;
              break;
            }
            if (var_11 == 0) {
              var_11 = 1;
            }
            var_9 = (*(type_6 *)PTR_wcwidth_000363ac)(wc);
            if (var_9 < 0) {
              if ((var_6 & 2U) != 0) goto LAB_000172f0;
              var_9 = (*(type_6 *)PTR_iswcntrl_0003637c)(wc);
              if (var_9 == 0) {
                if (var_7 == 0x7fffffff) goto LAB_00017314;
                var_7 = var_7 + 1;
              }
            }
            else {
              if (0x7fffffff - var_7 < var_9) {
LAB_00017314:
                var_7 = 0x7fffffff;
                goto LAB_00017144;
              }
              var_7 = var_7 + var_9;
            }
            var_1 = var_1 + var_11;
            var_9 = (*(type_6 *)PTR_mbsinit_0003639c)(&mbstate);
          } while (var_9 == 0);
        }
        else {
          if ((var_9 < 0x41) || ((0x5f < var_9 && (0x1d < (var_9 - 0x61U & 0xff)))))
          goto LAB_000171a8;
LAB_00017130:
          var_7 = var_7 + 1;
          var_1 = var_1 + 1;
        }
      } while (var_1 < var_4);
    }
  }
LAB_00017144:
  if (var_12 != *(char **)var_13) {
    var_13 = PTR___stack_chk_fail_00036384;
    (*(type_6 *)PTR___stack_chk_fail_00036384)();
    var_11 = (**(type_6 **)(var_13 + 0x1f004))();
    var_7 = function_1(var_12,var_11,var_2);
    return var_7;
  }
  return var_7;
LAB_000172f0:
  var_7 = -1;
  goto LAB_00017144;
}


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

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

{
  bool bVar1;
  ushort uVar2;
  uint uVar3;
  int iVar4;
  int iVar5;
  int *piVar6;
  undefined4 uVar7;
  int iVar8;
  char *pcVar9;
  undefined *puVar10;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  int local_2c;
  
  puVar10 = PTR___stack_chk_guard_000363a0;
  pcVar9 = param_1 + (int)param_2;
  local_2c = *(int *)PTR___stack_chk_guard_000363a0;
  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00036364)();
  if (uVar3 < 2) {
    iVar8 = 0;
    if (param_1 < pcVar9) {
      param_1 = param_1 + 1;
      piVar6 = (int *)(*(code *)PTR___ctype_b_loc_0003629c)();
      param_2 = (char *)0x7fffffff;
      do {
        uVar2 = *(ushort *)(*piVar6 + (uint)(byte)param_1[-1] * 2);
        if ((uVar2 & 0x40) == 0) {
          if ((param_3 & 2) != 0) goto LAB_000172f0;
          if ((uVar2 & 0x200) == 0) goto LAB_000172bc;
        }
        else {
LAB_000172bc:
          if (iVar8 == 0x7fffffff) break;
          iVar8 = iVar8 + 1;
        }
        bVar1 = pcVar9 != param_1;
        param_1 = param_1 + 1;
      } while (bVar1);
    }
  }
  else {
    iVar8 = 0;
    if (param_1 < pcVar9) {
      do {
        iVar4 = (int)*param_1;
        if (iVar4 < 0x40) {
          if ((0x24 < iVar4) || ((iVar4 - 0x20U & 0xff) < 4)) goto LAB_00017130;
LAB_000171a8:
          local_34 = 0;
          local_30 = 0;
          do {
            param_2 = param_1;
            iVar4 = rpl_mbrtowc(&local_38,param_1,(int)pcVar9 - (int)param_1,&local_34);
            if (iVar4 == -1) {
              if ((param_3 & 1) != 0) goto LAB_000172f0;
              goto LAB_00017130;
            }
            if (iVar4 == -2) {
              if ((param_3 & 1) != 0) goto LAB_000172f0;
              iVar8 = iVar8 + 1;
              param_1 = pcVar9;
              break;
            }
            if (iVar4 == 0) {
              iVar4 = 1;
            }
            iVar5 = (*(code *)PTR_wcwidth_000363ac)(local_38);
            if (iVar5 < 0) {
              if ((param_3 & 2) != 0) goto LAB_000172f0;
              iVar5 = (*(code *)PTR_iswcntrl_0003637c)(local_38);
              if (iVar5 == 0) {
                if (iVar8 == 0x7fffffff) goto LAB_00017314;
                iVar8 = iVar8 + 1;
              }
            }
            else {
              if (0x7fffffff - iVar8 < iVar5) {
LAB_00017314:
                iVar8 = 0x7fffffff;
                goto LAB_00017144;
              }
              iVar8 = iVar8 + iVar5;
            }
            param_1 = param_1 + iVar4;
            iVar4 = (*(code *)PTR_mbsinit_0003639c)(&local_34);
          } while (iVar4 == 0);
        }
        else {
          if ((iVar4 < 0x41) || ((0x5f < iVar4 && (0x1d < (iVar4 - 0x61U & 0xff)))))
          goto LAB_000171a8;
LAB_00017130:
          iVar8 = iVar8 + 1;
          param_1 = param_1 + 1;
        }
      } while (param_1 < pcVar9);
    }
  }
LAB_00017144:
  if (local_2c != *(int *)puVar10) {
    iVar8 = local_2c;
    puVar10 = PTR___stack_chk_fail_00036384;
    (*(code *)PTR___stack_chk_fail_00036384)();
    uVar7 = (**(code **)(puVar10 + 0x1f004))();
    iVar8 = MASKED(iVar8,uVar7,param_2);
    return iVar8;
  }
  return iVar8;
LAB_000172f0:
  iVar8 = -1;
  goto LAB_00017144;
}

