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

{
  bool bVar1;
  ushort uVar2;
  char *string_00;
  uint uVar3;
  int *piVar4;
  int iVar5;
  size_t sVar6;
  int iVar7;
  byte *pbVar8;
  int iVar9;
  byte *pbVar10;
  undefined *puVar11;
  wchar_t wc;
  mbstate_t mbstate;
  
  string_00 = *(char **)PTR___stack_chk_guard_0003758c;
  pbVar10 = (byte *)(string + nbytes);
  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();
  if (uVar3 < 2) {
    iVar9 = 0;
    if (string < pbVar10) {
      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();
      iVar9 = 0;
      nbytes = 0x7fffffff;
      do {
        pbVar8 = (byte *)string + 1;
        uVar2 = *(ushort *)(*piVar4 + (uint)(byte)*string * 2);
        if ((uVar2 & 0x40) == 0) {
          if ((flags & 2U) != 0) {
            iVar9 = -1;
            break;
          }
          iVar5 = iVar9;
          if ((uVar2 & 0x200) == 0) {
            if (iVar9 == 0x7fffffff) break;
            iVar5 = iVar9 + 1;
          }
        }
        else {
          iVar5 = iVar9 + 1;
          if (iVar9 == 0x7fffffff) break;
        }
        iVar9 = iVar5;
        string = (char *)pbVar8;
      } while (pbVar10 != pbVar8);
    }
  }
  else if (string < pbVar10) {
    iVar9 = 0;
    do {
      iVar5 = (int)*string;
      if (iVar5 < 0x40) {
        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;
LAB_0001aef8:
        mbstate.__count = 0;
        mbstate.__value.__wch = 0;
        do {
          nbytes = (size_t)string;
          sVar6 = rpl_mbrtowc(&wc,string,(int)pbVar10 - (int)string,&mbstate);
          if (sVar6 == 0xffffffff) {
            string = (char *)((byte *)string + 1);
            if ((flags & 1U) != 0) {
LAB_0001afe8:
              iVar9 = -1;
              goto LAB_0001affc;
            }
            iVar9 = iVar9 + 1;
            break;
          }
          if (sVar6 == 0xfffffffe) {
            if ((flags & 1U) != 0) goto LAB_0001afe8;
            iVar9 = iVar9 + 1;
            string = (char *)pbVar10;
            break;
          }
          if (sVar6 == 0) {
            sVar6 = 1;
          }
          iVar5 = (*(code *)PTR_wcwidth_000375a0)(wc);
          iVar7 = 0x7fffffff - iVar9;
          if (iVar5 < 0) {
            if ((flags & 2U) != 0) goto LAB_0001afe8;
            iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc);
            if ((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))
            goto LAB_0001aff0;
          }
          else {
            iVar9 = iVar9 + iVar5;
            if (iVar7 < iVar5) {
LAB_0001aff0:
              iVar9 = 0x7fffffff;
              goto LAB_0001affc;
            }
          }
          iVar5 = (*(code *)PTR_mbsinit_00037588)(&mbstate);
          string = (char *)((byte *)string + sVar6);
        } while (iVar5 == 0);
      }
      else {
        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))
        goto LAB_0001aef8;
LAB_0001aeb8:
        string = (char *)((byte *)string + 1);
        iVar9 = iVar9 + 1;
      }
    } while (string < pbVar10);
  }
  else {
    iVar9 = 0;
  }
LAB_0001affc:
  if (string_00 != *(char **)PTR___stack_chk_guard_0003758c) {
    puVar11 = PTR___stack_chk_fail_0003756c;
    (*(code *)PTR___stack_chk_fail_0003756c)();
    sVar6 = (**(code **)(puVar11 + 0x1c448))();
    iVar9 = mbsnwidth(string_00,sVar6,nbytes);
    return iVar9;
  }
  return iVar9;
}



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

{
  bool bVar1;
  ushort uVar2;
  uint uVar3;
  int *piVar4;
  int iVar5;
  int iVar6;
  undefined4 uVar7;
  int iVar8;
  byte *pbVar9;
  int iVar10;
  byte *pbVar11;
  undefined *puVar12;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  int local_2c;
  
  local_2c = *(int *)PTR___stack_chk_guard_0003758c;
  pbVar11 = param_1 + (int)param_2;
  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();
  if (uVar3 < 2) {
    iVar10 = 0;
    if (param_1 < pbVar11) {
      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();
      iVar10 = 0;
      param_2 = (byte *)0x7fffffff;
      do {
        pbVar9 = param_1 + 1;
        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);
        if ((uVar2 & 0x40) == 0) {
          if ((param_3 & 2) != 0) {
            iVar10 = -1;
            break;
          }
          iVar5 = iVar10;
          if ((uVar2 & 0x200) == 0) {
            if (iVar10 == 0x7fffffff) break;
            iVar5 = iVar10 + 1;
          }
        }
        else {
          iVar5 = iVar10 + 1;
          if (iVar10 == 0x7fffffff) break;
        }
        iVar10 = iVar5;
        param_1 = pbVar9;
      } while (pbVar11 != pbVar9);
    }
  }
  else if (param_1 < pbVar11) {
    iVar10 = 0;
    do {
      iVar5 = (int)(char)*param_1;
      if (iVar5 < 0x40) {
        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;
LAB_0001aef8:
        local_34 = 0;
        local_30 = 0;
        do {
          param_2 = param_1;
          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);
          if (iVar5 == -1) {
            param_1 = param_1 + 1;
            if ((param_3 & 1) != 0) {
LAB_0001afe8:
              iVar10 = -1;
              goto LAB_0001affc;
            }
            iVar10 = iVar10 + 1;
            break;
          }
          if (iVar5 == -2) {
            if ((param_3 & 1) != 0) goto LAB_0001afe8;
            iVar10 = iVar10 + 1;
            param_1 = pbVar11;
            break;
          }
          if (iVar5 == 0) {
            iVar5 = 1;
          }
          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);
          iVar8 = 0x7fffffff - iVar10;
          if (iVar6 < 0) {
            if ((param_3 & 2) != 0) goto LAB_0001afe8;
            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);
            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))
            goto LAB_0001aff0;
          }
          else {
            iVar10 = iVar10 + iVar6;
            if (iVar8 < iVar6) {
LAB_0001aff0:
              iVar10 = 0x7fffffff;
              goto LAB_0001affc;
            }
          }
          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);
          param_1 = param_1 + iVar5;
        } while (iVar6 == 0);
      }
      else {
        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))
        goto LAB_0001aef8;
LAB_0001aeb8:
        param_1 = param_1 + 1;
        iVar10 = iVar10 + 1;
      }
    } while (param_1 < pbVar11);
  }
  else {
    iVar10 = 0;
  }
LAB_0001affc:
  if (local_2c != *(int *)PTR___stack_chk_guard_0003758c) {
    iVar10 = local_2c;
    puVar12 = PTR___stack_chk_fail_0003756c;
    (*(code *)PTR___stack_chk_fail_0003756c)();
    uVar7 = (**(code **)(puVar12 + 0x1c448))();
    iVar10 = mbsnwidth(iVar10,uVar7,param_2);
    return iVar10;
  }
  return iVar10;
}


lui gp,0x2
addiu gp,gp,0x4460
addu gp,gp,t9
addiu sp,sp,-0x50
sw ra,0x4c(sp)
sw s8,0x48(sp)
sw s7,0x44(sp)
sw s6,0x40(sp)
sw s5,0x3c(sp)
sw s4,0x38(sp)
sw s3,0x34(sp)
sw s2,0x30(sp)
sw s1,0x2c(sp)
sw s0,0x28(sp)
sw gp,0x10(sp)
or s0,a0,zero
or s5,a2,zero
lw v0,-0x7cb4(gp)
lw v0,0x0(v0)
sw v0,0x24(sp)
addu s2,a0,a1
lw t9,-0x7cfc(gp)
jalr t9
_nop
lw gp,0x10(sp)
sltiu v0,v0,0x2
bne v0,zero,0x0001ae68
_sltu v0,s0,s2
beq v0,zero,0x0001b098
_andi s4,s5,0x2
or s1,zero,zero
lui s3,0x7fff
b 0x0001aecc
_ori s3,s3,0xffff
beq v0,zero,0x0001aff8
_or s1,zero,zero
lw t9,-0x7df8(gp)
jalr t9
_nop
lw gp,0x10(sp)
lw a0,0x0(v0)
or s1,zero,zero
andi s5,s5,0x2
lui a1,0x7fff
b 0x0001b044
_ori a1,a1,0xffff
bne v1,zero,0x0001aef8
_slti v1,v0,0x60
bne v1,zero,0x0001aeb8
_addiu v0,v0,-0x61
andi v0,v0,0xff
sltiu v0,v0,0x1e
beq v0,zero,0x0001aef8
_nop
addiu s0,s0,0x1
addiu s1,s1,0x1
sltu v0,s0,s2
beq v0,zero,0x0001affc
_or v0,s1,zero
lb v0,0x0(s0)
slti v1,v0,0x40
beq v1,zero,0x0001ae98
_slti v1,v0,0x41
slti v1,v0,0x25
beq v1,zero,0x0001aeb8
_addiu v0,v0,-0x20
andi v0,v0,0xff
sltiu v0,v0,0x4
bne v0,zero,0x0001aeb8
_nop
sw zero,0x1c(sp)
sw zero,0x20(sp)
addiu s7,sp,0x1c
b 0x0001af70
_addiu s8,sp,0x18
andi v0,s5,0x1
bne v0,zero,0x0001afe8
_addiu s0,s0,0x1
b 0x0001aec0
_addiu s1,s1,0x1
bne v0,zero,0x0001afe8
_or s0,s2,zero
b 0x0001aec0
_addiu s1,s1,0x1
lw t9,-0x7ca0(gp)
jalr t9
_nop
lw gp,0x10(sp)
bltz v0,0x0001afb8
_subu v1,s3,s1
slt v1,v1,v0
bne v1,zero,0x0001aff0
_addu s1,s1,v0
or a0,s7,zero
lw t9,-0x7cb8(gp)
jalr t9
_nop
lw gp,0x10(sp)
bne v0,zero,0x0001aec0
_addu s0,s0,s6
or a3,s7,zero
subu a2,s2,s0
or a1,s0,zero
or a0,s8,zero
lw t9,-0x7ec4(gp)
bal 0x00021070
_nop
lw gp,0x10(sp)
or s6,v0,zero
li v0,-0x1
beq s6,v0,0x0001af0c
_li v0,-0x2
beq s6,v0,0x0001af20
_andi v0,s5,0x1
bne s6,zero,0x0001af30
_lw a0,0x18(sp)
b 0x0001af30
_li s6,0x1
bne s4,zero,0x0001afe8
_lw a0,0x18(sp)
lw t9,-0x7cd8(gp)
jalr t9
_nop
lw gp,0x10(sp)
bne v0,zero,0x0001af58
_or a0,s7,zero
beq s1,s3,0x0001aff0
_addiu s1,s1,0x1
b 0x0001af5c
_lw t9,-0x7cb8(gp)
b 0x0001aff8
_li s1,-0x1
lui s1,0x7fff
ori s1,s1,0xffff
or v0,s1,zero
lw a0,0x24(sp)
lw v1,-0x7cb4(gp)
lw v1,0x0(v1)
bne a0,v1,0x0001b0a8
_lw ra,0x4c(sp)
lw s8,0x48(sp)
lw s7,0x44(sp)
lw s6,0x40(sp)
lw s5,0x3c(sp)
lw s4,0x38(sp)
lw s3,0x34(sp)
lw s2,0x30(sp)
lw s1,0x2c(sp)
lw s0,0x28(sp)
jr ra
_addiu sp,sp,0x50
beq s2,s0,0x0001affc
_or v0,s1,zero
addiu s0,s0,0x1
lbu v0,-0x1(s0)
sll v0,v0,0x1
addu v0,a0,v0
lhu v0,0x0(v0)
andi v1,v0,0x40
beq v1,zero,0x0001b078
_nop
bne s1,a1,0x0001b03c
_addiu s1,s1,0x1
addiu s1,s1,-0x1
b 0x0001affc
_or v0,s1,zero
bne s5,zero,0x0001b0a0
_andi v0,v0,0x200
bne v0,zero,0x0001b03c
_nop
beq s1,a1,0x0001affc
_or v0,s1,zero
b 0x0001b03c
_addiu s1,s1,0x1
b 0x0001aff8
_or s1,zero,zero
b 0x0001aff8
_li s1,-0x1
lw t9,-0x7cd4(gp)
jalr t9
_nop
(translation_unit "int mbsnwidth(byte *param_1,byte *param_2,uint param_3)\n\n{\n  bool bVar1;\n  ushort uVar2;\n  uint uVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  int iVar8;\n  byte *pbVar9;\n  int iVar10;\n  byte *pbVar11;\n  undefined *puVar12;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  local_2c = *(int *)PTR___stack_chk_guard_0003758c;\n  pbVar11 = param_1 + (int)param_2;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();\n  if (uVar3 < 2) {\n    iVar10 = 0;\n    if (param_1 < pbVar11) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }\n  }\n  else if (param_1 < pbVar11) {\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }\n  else {\n    iVar10 = 0;\n  }\nLAB_0001affc:\n  if (local_2c != *(int *)PTR___stack_chk_guard_0003758c) {\n    iVar10 = local_2c;\n    puVar12 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    uVar7 = (**(code **)(puVar12 + 0x1c448))();\n    iVar10 = mbsnwidth(iVar10,uVar7,param_2);\n    return iVar10;\n  }\n  return iVar10;\n}\n\n" (function_definition "int mbsnwidth(byte *param_1,byte *param_2,uint param_3)\n\n{\n  bool bVar1;\n  ushort uVar2;\n  uint uVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  int iVar8;\n  byte *pbVar9;\n  int iVar10;\n  byte *pbVar11;\n  undefined *puVar12;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  local_2c = *(int *)PTR___stack_chk_guard_0003758c;\n  pbVar11 = param_1 + (int)param_2;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();\n  if (uVar3 < 2) {\n    iVar10 = 0;\n    if (param_1 < pbVar11) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }\n  }\n  else if (param_1 < pbVar11) {\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }\n  else {\n    iVar10 = 0;\n  }\nLAB_0001affc:\n  if (local_2c != *(int *)PTR___stack_chk_guard_0003758c) {\n    iVar10 = local_2c;\n    puVar12 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    uVar7 = (**(code **)(puVar12 + 0x1c448))();\n    iVar10 = mbsnwidth(iVar10,uVar7,param_2);\n    return iVar10;\n  }\n  return iVar10;\n}" primitive_type (function_declarator "mbsnwidth(byte *param_1,byte *param_2,uint param_3)" identifier (parameter_list "(byte *param_1,byte *param_2,uint param_3)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "byte *param_2" type_identifier (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 *piVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  int iVar8;\n  byte *pbVar9;\n  int iVar10;\n  byte *pbVar11;\n  undefined *puVar12;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  local_2c = *(int *)PTR___stack_chk_guard_0003758c;\n  pbVar11 = param_1 + (int)param_2;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();\n  if (uVar3 < 2) {\n    iVar10 = 0;\n    if (param_1 < pbVar11) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }\n  }\n  else if (param_1 < pbVar11) {\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }\n  else {\n    iVar10 = 0;\n  }\nLAB_0001affc:\n  if (local_2c != *(int *)PTR___stack_chk_guard_0003758c) {\n    iVar10 = local_2c;\n    puVar12 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    uVar7 = (**(code **)(puVar12 + 0x1c448))();\n    iVar10 = mbsnwidth(iVar10,uVar7,param_2);\n    return iVar10;\n  }\n  return iVar10;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "ushort uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined4 uVar7;" type_identifier identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "byte *pbVar9;" type_identifier (pointer_declarator "*pbVar9" * identifier) ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "byte *pbVar11;" type_identifier (pointer_declarator "*pbVar11" * identifier) ;) (declaration "undefined *puVar12;" type_identifier (pointer_declarator "*puVar12" * 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 "local_2c = *(int *)PTR___stack_chk_guard_0003758c;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_0003758c" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_0003758c" * (cast_expression "(int *)PTR___stack_chk_guard_0003758c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "pbVar11 = param_1 + (int)param_2;" (assignment_expression "pbVar11 = 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 "uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();" (assignment_expression "uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)()" identifier = (call_expression "(*(code *)PTR___ctype_get_mb_cur_max_00037544)()" (parenthesized_expression "(*(code *)PTR___ctype_get_mb_cur_max_00037544)" ( (pointer_expression "*(code *)PTR___ctype_get_mb_cur_max_00037544" * (cast_expression "(code *)PTR___ctype_get_mb_cur_max_00037544" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (uVar3 < 2) {\n    iVar10 = 0;\n    if (param_1 < pbVar11) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }\n  }\n  else if (param_1 < pbVar11) {\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }\n  else {\n    iVar10 = 0;\n  }" if (parenthesized_expression "(uVar3 < 2)" ( (binary_expression "uVar3 < 2" identifier < number_literal) )) (compound_statement "{\n    iVar10 = 0;\n    if (param_1 < pbVar11) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }\n  }" { (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (if_statement "if (param_1 < pbVar11) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }" if (parenthesized_expression "(param_1 < pbVar11)" ( (binary_expression "param_1 < pbVar11" identifier < identifier) )) (compound_statement "{\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }" { (expression_statement "piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();" (assignment_expression "piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)()" identifier = (cast_expression "(int *)(*(code *)PTR___ctype_b_loc_00037448)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___ctype_b_loc_00037448)()" (parenthesized_expression "(*(code *)PTR___ctype_b_loc_00037448)" ( (pointer_expression "*(code *)PTR___ctype_b_loc_00037448" * (cast_expression "(code *)PTR___ctype_b_loc_00037448" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (expression_statement "param_2 = (byte *)0x7fffffff;" (assignment_expression "param_2 = (byte *)0x7fffffff" identifier = (cast_expression "(byte *)0x7fffffff" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (do_statement "do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);" do (compound_statement "{\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      }" { (expression_statement "pbVar9 = param_1 + 1;" (assignment_expression "pbVar9 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);" (assignment_expression "uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2)" identifier = (pointer_expression "*(ushort *)(*piVar4 + (uint)*param_1 * 2)" * (cast_expression "(ushort *)(*piVar4 + (uint)*param_1 * 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + (uint)*param_1 * 2)" ( (binary_expression "*piVar4 + (uint)*param_1 * 2" (pointer_expression "*piVar4" * identifier) + (binary_expression "(uint)*param_1 * 2" (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" ( identifier )) * identifier) * number_literal)) ))))) ;) (if_statement "if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\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) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }" { (if_statement "if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }" 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) )) (compound_statement "{\n            iVar10 = -1;\n            break;\n          }" { (expression_statement "iVar10 = -1;" (assignment_expression "iVar10 = -1" identifier = number_literal) ;) (break_statement "break;" break ;) })) (expression_statement "iVar5 = iVar10;" (assignment_expression "iVar5 = iVar10" identifier = identifier) ;) (if_statement "if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }" if (parenthesized_expression "((uVar2 & 0x200) == 0)" ( (binary_expression "(uVar2 & 0x200) == 0" (parenthesized_expression "(uVar2 & 0x200)" ( (binary_expression "uVar2 & 0x200" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }" { (if_statement "if (iVar10 == 0x7fffffff) break;" if (parenthesized_expression "(iVar10 == 0x7fffffff)" ( (binary_expression "iVar10 == 0x7fffffff" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar5 = iVar10 + 1;" (assignment_expression "iVar5 = iVar10 + 1" identifier = (binary_expression "iVar10 + 1" identifier + number_literal)) ;) })) }) (else_clause "else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }" else (compound_statement "{\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }" { (expression_statement "iVar5 = iVar10 + 1;" (assignment_expression "iVar5 = iVar10 + 1" identifier = (binary_expression "iVar10 + 1" identifier + number_literal)) ;) (if_statement "if (iVar10 == 0x7fffffff) break;" if (parenthesized_expression "(iVar10 == 0x7fffffff)" ( (binary_expression "iVar10 == 0x7fffffff" identifier == number_literal) )) (break_statement "break;" break ;)) }))) (expression_statement "iVar10 = iVar5;" (assignment_expression "iVar10 = iVar5" identifier = identifier) ;) (expression_statement "param_1 = pbVar9;" (assignment_expression "param_1 = pbVar9" identifier = identifier) ;) }) while (parenthesized_expression "(pbVar11 != pbVar9)" ( (binary_expression "pbVar11 != pbVar9" identifier != identifier) )) ;) })) }) (else_clause "else if (param_1 < pbVar11) {\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }\n  else {\n    iVar10 = 0;\n  }" else (if_statement "if (param_1 < pbVar11) {\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }\n  else {\n    iVar10 = 0;\n  }" if (parenthesized_expression "(param_1 < pbVar11)" ( (binary_expression "param_1 < pbVar11" identifier < identifier) )) (compound_statement "{\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }" { (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);" do (compound_statement "{\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    }" { (expression_statement "iVar5 = (int)(char)*param_1;" (assignment_expression "iVar5 = (int)(char)*param_1" identifier = (cast_expression "(int)(char)*param_1" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)*param_1" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_1" * identifier)))) ;) (if_statement "if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }" if (parenthesized_expression "(iVar5 < 0x40)" ( (binary_expression "iVar5 < 0x40" identifier < number_literal) )) (compound_statement "{\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }" { (if_statement "if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;" if (parenthesized_expression "((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4))" ( (binary_expression "(0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)" (parenthesized_expression "(0x24 < iVar5)" ( (binary_expression "0x24 < iVar5" number_literal < identifier) )) || (parenthesized_expression "((iVar5 - 0x20U & 0xff) < 4)" ( (binary_expression "(iVar5 - 0x20U & 0xff) < 4" (parenthesized_expression "(iVar5 - 0x20U & 0xff)" ( (binary_expression "iVar5 - 0x20U & 0xff" (binary_expression "iVar5 - 0x20U" identifier - number_literal) & number_literal) )) < number_literal) ))) )) (goto_statement "goto LAB_0001aeb8;" goto statement_identifier ;)) (labeled_statement "LAB_0001aef8:\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          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);" do (compound_statement "{\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        }" { (expression_statement "param_2 = param_1;" (assignment_expression "param_2 = param_1" identifier = identifier) ;) (expression_statement "iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);" (assignment_expression "iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34)" identifier = (call_expression "rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34)" identifier (argument_list "(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34)" ( (pointer_expression "&local_38" & identifier) , identifier , (binary_expression "(int)pbVar11 - (int)param_1" (cast_expression "(int)pbVar11" ( (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 (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }" if (parenthesized_expression "(iVar5 == -1)" ( (binary_expression "iVar5 == -1" identifier == number_literal) )) (compound_statement "{\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }" { (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (if_statement "if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }" 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) )) (compound_statement "{\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }" { (labeled_statement "LAB_0001afe8:\n              iVar10 = -1;" statement_identifier : (expression_statement "iVar10 = -1;" (assignment_expression "iVar10 = -1" identifier = number_literal) ;)) (goto_statement "goto LAB_0001affc;" goto statement_identifier ;) })) (expression_statement "iVar10 = iVar10 + 1;" (assignment_expression "iVar10 = iVar10 + 1" identifier = (binary_expression "iVar10 + 1" identifier + number_literal)) ;) (break_statement "break;" break ;) })) (if_statement "if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }" if (parenthesized_expression "(iVar5 == -2)" ( (binary_expression "iVar5 == -2" identifier == number_literal) )) (compound_statement "{\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }" { (if_statement "if ((param_3 & 1) != 0) goto LAB_0001afe8;" 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_0001afe8;" goto statement_identifier ;)) (expression_statement "iVar10 = iVar10 + 1;" (assignment_expression "iVar10 = iVar10 + 1" identifier = (binary_expression "iVar10 + 1" identifier + number_literal)) ;) (expression_statement "param_1 = pbVar11;" (assignment_expression "param_1 = pbVar11" identifier = identifier) ;) (break_statement "break;" break ;) })) (if_statement "if (iVar5 == 0) {\n            iVar5 = 1;\n          }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n            iVar5 = 1;\n          }" { (expression_statement "iVar5 = 1;" (assignment_expression "iVar5 = 1" identifier = number_literal) ;) })) (expression_statement "iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);" (assignment_expression "iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38)" identifier = (call_expression "(*(code *)PTR_wcwidth_000375a0)(local_38)" (parenthesized_expression "(*(code *)PTR_wcwidth_000375a0)" ( (pointer_expression "*(code *)PTR_wcwidth_000375a0" * (cast_expression "(code *)PTR_wcwidth_000375a0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(local_38)" ( identifier )))) ;) (expression_statement "iVar8 = 0x7fffffff - iVar10;" (assignment_expression "iVar8 = 0x7fffffff - iVar10" identifier = (binary_expression "0x7fffffff - iVar10" number_literal - identifier)) ;) (if_statement "if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }" if (parenthesized_expression "(iVar6 < 0)" ( (binary_expression "iVar6 < 0" identifier < number_literal) )) (compound_statement "{\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }" { (if_statement "if ((param_3 & 2) != 0) goto LAB_0001afe8;" 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_0001afe8;" goto statement_identifier ;)) (expression_statement "iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);" (assignment_expression "iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38)" identifier = (call_expression "(*(code *)PTR_iswcntrl_00037568)(local_38)" (parenthesized_expression "(*(code *)PTR_iswcntrl_00037568)" ( (pointer_expression "*(code *)PTR_iswcntrl_00037568" * (cast_expression "(code *)PTR_iswcntrl_00037568" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(local_38)" ( identifier )))) ;) (if_statement "if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;" if (parenthesized_expression "((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))" ( (binary_expression "(iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1)" (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) && (parenthesized_expression "(bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1)" ( (comma_expression "bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1" (assignment_expression "bVar1 = iVar10 == 0x7fffffff" identifier = (binary_expression "iVar10 == 0x7fffffff" identifier == number_literal)) , (comma_expression "iVar10 = iVar10 + 1, bVar1" (assignment_expression "iVar10 = iVar10 + 1" identifier = (binary_expression "iVar10 + 1" identifier + number_literal)) , identifier)) ))) )) (goto_statement "goto LAB_0001aff0;" goto statement_identifier ;)) }) (else_clause "else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }" else (compound_statement "{\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }" { (expression_statement "iVar10 = iVar10 + iVar6;" (assignment_expression "iVar10 = iVar10 + iVar6" identifier = (binary_expression "iVar10 + iVar6" identifier + identifier)) ;) (if_statement "if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }" if (parenthesized_expression "(iVar8 < iVar6)" ( (binary_expression "iVar8 < iVar6" identifier < identifier) )) (compound_statement "{\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }" { (labeled_statement "LAB_0001aff0:\n              iVar10 = 0x7fffffff;" statement_identifier : (expression_statement "iVar10 = 0x7fffffff;" (assignment_expression "iVar10 = 0x7fffffff" identifier = number_literal) ;)) (goto_statement "goto LAB_0001affc;" goto statement_identifier ;) })) }))) (expression_statement "iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);" (assignment_expression "iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34)" identifier = (call_expression "(*(code *)PTR_mbsinit_00037588)(&local_34)" (parenthesized_expression "(*(code *)PTR_mbsinit_00037588)" ( (pointer_expression "*(code *)PTR_mbsinit_00037588" * (cast_expression "(code *)PTR_mbsinit_00037588" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(&local_34)" ( (pointer_expression "&local_34" & identifier) )))) ;) (expression_statement "param_1 = param_1 + iVar5;" (assignment_expression "param_1 = param_1 + iVar5" identifier = (binary_expression "param_1 + iVar5" identifier + identifier)) ;) }) while (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) ;) }) (else_clause "else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }" else (compound_statement "{\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }" { (if_statement "if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;" if (parenthesized_expression "((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))" ( (binary_expression "(iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff))))" (parenthesized_expression "(iVar5 < 0x41)" ( (binary_expression "iVar5 < 0x41" identifier < number_literal) )) || (parenthesized_expression "((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff))))" ( (parenthesized_expression "(0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))" ( (binary_expression "0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff))" (binary_expression "0x5f < iVar5" number_literal < identifier) && (parenthesized_expression "(0x1d < (iVar5 - 0x61U & 0xff))" ( (binary_expression "0x1d < (iVar5 - 0x61U & 0xff)" number_literal < (parenthesized_expression "(iVar5 - 0x61U & 0xff)" ( (binary_expression "iVar5 - 0x61U & 0xff" (binary_expression "iVar5 - 0x61U" identifier - number_literal) & number_literal) ))) ))) )) ))) )) (goto_statement "goto LAB_0001aef8;" goto statement_identifier ;)) (labeled_statement "LAB_0001aeb8:\n        param_1 = param_1 + 1;" statement_identifier : (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 "iVar10 = iVar10 + 1;" (assignment_expression "iVar10 = iVar10 + 1" identifier = (binary_expression "iVar10 + 1" identifier + number_literal)) ;) }))) }) while (parenthesized_expression "(param_1 < pbVar11)" ( (binary_expression "param_1 < pbVar11" identifier < identifier) )) ;) }) (else_clause "else {\n    iVar10 = 0;\n  }" else (compound_statement "{\n    iVar10 = 0;\n  }" { (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) }))))) (labeled_statement "LAB_0001affc:\n  if (local_2c != *(int *)PTR___stack_chk_guard_0003758c) {\n    iVar10 = local_2c;\n    puVar12 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    uVar7 = (**(code **)(puVar12 + 0x1c448))();\n    iVar10 = mbsnwidth(iVar10,uVar7,param_2);\n    return iVar10;\n  }" statement_identifier : (if_statement "if (local_2c != *(int *)PTR___stack_chk_guard_0003758c) {\n    iVar10 = local_2c;\n    puVar12 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    uVar7 = (**(code **)(puVar12 + 0x1c448))();\n    iVar10 = mbsnwidth(iVar10,uVar7,param_2);\n    return iVar10;\n  }" if (parenthesized_expression "(local_2c != *(int *)PTR___stack_chk_guard_0003758c)" ( (binary_expression "local_2c != *(int *)PTR___stack_chk_guard_0003758c" identifier != (pointer_expression "*(int *)PTR___stack_chk_guard_0003758c" * (cast_expression "(int *)PTR___stack_chk_guard_0003758c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    iVar10 = local_2c;\n    puVar12 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    uVar7 = (**(code **)(puVar12 + 0x1c448))();\n    iVar10 = mbsnwidth(iVar10,uVar7,param_2);\n    return iVar10;\n  }" { (expression_statement "iVar10 = local_2c;" (assignment_expression "iVar10 = local_2c" identifier = identifier) ;) (expression_statement "puVar12 = PTR___stack_chk_fail_0003756c;" (assignment_expression "puVar12 = PTR___stack_chk_fail_0003756c" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_0003756c)();" (call_expression "(*(code *)PTR___stack_chk_fail_0003756c)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_0003756c)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_0003756c" * (cast_expression "(code *)PTR___stack_chk_fail_0003756c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "uVar7 = (**(code **)(puVar12 + 0x1c448))();" (assignment_expression "uVar7 = (**(code **)(puVar12 + 0x1c448))()" identifier = (call_expression "(**(code **)(puVar12 + 0x1c448))()" (parenthesized_expression "(**(code **)(puVar12 + 0x1c448))" ( (pointer_expression "**(code **)(puVar12 + 0x1c448)" * (pointer_expression "*(code **)(puVar12 + 0x1c448)" * (cast_expression "(code **)(puVar12 + 0x1c448)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar12 + 0x1c448)" ( (binary_expression "puVar12 + 0x1c448" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (expression_statement "iVar10 = mbsnwidth(iVar10,uVar7,param_2);" (assignment_expression "iVar10 = mbsnwidth(iVar10,uVar7,param_2)" identifier = (call_expression "mbsnwidth(iVar10,uVar7,param_2)" identifier (argument_list "(iVar10,uVar7,param_2)" ( identifier , identifier , identifier )))) ;) (return_statement "return iVar10;" return identifier ;) }))) (return_statement "return iVar10;" return 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 *piVar4;\n  int iVar5;\n  size_t sVar6;\n  int iVar7;\n  byte *pbVar8;\n  int iVar9;\n  byte *pbVar10;\n  undefined *puVar11;\n  wchar_t wc;\n  mbstate_t mbstate;\n  \n  string_00 = *(char **)PTR___stack_chk_guard_0003758c;\n  pbVar10 = (byte *)(string + nbytes);\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();\n  if (uVar3 < 2) {\n    iVar9 = 0;\n    if (string < pbVar10) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar9 = 0;\n      nbytes = 0x7fffffff;\n      do {\n        pbVar8 = (byte *)string + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)(byte)*string * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) {\n            iVar9 = -1;\n            break;\n          }\n          iVar5 = iVar9;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar9 == 0x7fffffff) break;\n            iVar5 = iVar9 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar9 + 1;\n          if (iVar9 == 0x7fffffff) break;\n        }\n        iVar9 = iVar5;\n        string = (char *)pbVar8;\n      } while (pbVar10 != pbVar8);\n    }\n  }\n  else if (string < pbVar10) {\n    iVar9 = 0;\n    do {\n      iVar5 = (int)*string;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        mbstate.__count = 0;\n        mbstate.__value.__wch = 0;\n        do {\n          nbytes = (size_t)string;\n          sVar6 = rpl_mbrtowc(&wc,string,(int)pbVar10 - (int)string,&mbstate);\n          if (sVar6 == 0xffffffff) {\n            string = (char *)((byte *)string + 1);\n            if ((flags & 1U) != 0) {\nLAB_0001afe8:\n              iVar9 = -1;\n              goto LAB_0001affc;\n            }\n            iVar9 = iVar9 + 1;\n            break;\n          }\n          if (sVar6 == 0xfffffffe) {\n            if ((flags & 1U) != 0) goto LAB_0001afe8;\n            iVar9 = iVar9 + 1;\n            string = (char *)pbVar10;\n            break;\n          }\n          if (sVar6 == 0) {\n            sVar6 = 1;\n          }\n          iVar5 = (*(code *)PTR_wcwidth_000375a0)(wc);\n          iVar7 = 0x7fffffff - iVar9;\n          if (iVar5 < 0) {\n            if ((flags & 2U) != 0) goto LAB_0001afe8;\n            iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc);\n            if ((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar9 = iVar9 + iVar5;\n            if (iVar7 < iVar5) {\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar5 = (*(code *)PTR_mbsinit_00037588)(&mbstate);\n          string = (char *)((byte *)string + sVar6);\n        } while (iVar5 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        string = (char *)((byte *)string + 1);\n        iVar9 = iVar9 + 1;\n      }\n    } while (string < pbVar10);\n  }\n  else {\n    iVar9 = 0;\n  }\nLAB_0001affc:\n  if (string_00 != *(char **)PTR___stack_chk_guard_0003758c) {\n    puVar11 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    sVar6 = (**(code **)(puVar11 + 0x1c448))();\n    iVar9 = mbsnwidth(string_00,sVar6,nbytes);\n    return iVar9;\n  }\n  return iVar9;\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 *piVar4;\n  int iVar5;\n  size_t sVar6;\n  int iVar7;\n  byte *pbVar8;\n  int iVar9;\n  byte *pbVar10;\n  undefined *puVar11;\n  wchar_t wc;\n  mbstate_t mbstate;\n  \n  string_00 = *(char **)PTR___stack_chk_guard_0003758c;\n  pbVar10 = (byte *)(string + nbytes);\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();\n  if (uVar3 < 2) {\n    iVar9 = 0;\n    if (string < pbVar10) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar9 = 0;\n      nbytes = 0x7fffffff;\n      do {\n        pbVar8 = (byte *)string + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)(byte)*string * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) {\n            iVar9 = -1;\n            break;\n          }\n          iVar5 = iVar9;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar9 == 0x7fffffff) break;\n            iVar5 = iVar9 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar9 + 1;\n          if (iVar9 == 0x7fffffff) break;\n        }\n        iVar9 = iVar5;\n        string = (char *)pbVar8;\n      } while (pbVar10 != pbVar8);\n    }\n  }\n  else if (string < pbVar10) {\n    iVar9 = 0;\n    do {\n      iVar5 = (int)*string;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        mbstate.__count = 0;\n        mbstate.__value.__wch = 0;\n        do {\n          nbytes = (size_t)string;\n          sVar6 = rpl_mbrtowc(&wc,string,(int)pbVar10 - (int)string,&mbstate);\n          if (sVar6 == 0xffffffff) {\n            string = (char *)((byte *)string + 1);\n            if ((flags & 1U) != 0) {\nLAB_0001afe8:\n              iVar9 = -1;\n              goto LAB_0001affc;\n            }\n            iVar9 = iVar9 + 1;\n            break;\n          }\n          if (sVar6 == 0xfffffffe) {\n            if ((flags & 1U) != 0) goto LAB_0001afe8;\n            iVar9 = iVar9 + 1;\n            string = (char *)pbVar10;\n            break;\n          }\n          if (sVar6 == 0) {\n            sVar6 = 1;\n          }\n          iVar5 = (*(code *)PTR_wcwidth_000375a0)(wc);\n          iVar7 = 0x7fffffff - iVar9;\n          if (iVar5 < 0) {\n            if ((flags & 2U) != 0) goto LAB_0001afe8;\n            iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc);\n            if ((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar9 = iVar9 + iVar5;\n            if (iVar7 < iVar5) {\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar5 = (*(code *)PTR_mbsinit_00037588)(&mbstate);\n          string = (char *)((byte *)string + sVar6);\n        } while (iVar5 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        string = (char *)((byte *)string + 1);\n        iVar9 = iVar9 + 1;\n      }\n    } while (string < pbVar10);\n  }\n  else {\n    iVar9 = 0;\n  }\nLAB_0001affc:\n  if (string_00 != *(char **)PTR___stack_chk_guard_0003758c) {\n    puVar11 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    sVar6 = (**(code **)(puVar11 + 0x1c448))();\n    iVar9 = mbsnwidth(string_00,sVar6,nbytes);\n    return iVar9;\n  }\n  return iVar9;\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 *piVar4;\n  int iVar5;\n  size_t sVar6;\n  int iVar7;\n  byte *pbVar8;\n  int iVar9;\n  byte *pbVar10;\n  undefined *puVar11;\n  wchar_t wc;\n  mbstate_t mbstate;\n  \n  string_00 = *(char **)PTR___stack_chk_guard_0003758c;\n  pbVar10 = (byte *)(string + nbytes);\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();\n  if (uVar3 < 2) {\n    iVar9 = 0;\n    if (string < pbVar10) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar9 = 0;\n      nbytes = 0x7fffffff;\n      do {\n        pbVar8 = (byte *)string + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)(byte)*string * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) {\n            iVar9 = -1;\n            break;\n          }\n          iVar5 = iVar9;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar9 == 0x7fffffff) break;\n            iVar5 = iVar9 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar9 + 1;\n          if (iVar9 == 0x7fffffff) break;\n        }\n        iVar9 = iVar5;\n        string = (char *)pbVar8;\n      } while (pbVar10 != pbVar8);\n    }\n  }\n  else if (string < pbVar10) {\n    iVar9 = 0;\n    do {\n      iVar5 = (int)*string;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        mbstate.__count = 0;\n        mbstate.__value.__wch = 0;\n        do {\n          nbytes = (size_t)string;\n          sVar6 = rpl_mbrtowc(&wc,string,(int)pbVar10 - (int)string,&mbstate);\n          if (sVar6 == 0xffffffff) {\n            string = (char *)((byte *)string + 1);\n            if ((flags & 1U) != 0) {\nLAB_0001afe8:\n              iVar9 = -1;\n              goto LAB_0001affc;\n            }\n            iVar9 = iVar9 + 1;\n            break;\n          }\n          if (sVar6 == 0xfffffffe) {\n            if ((flags & 1U) != 0) goto LAB_0001afe8;\n            iVar9 = iVar9 + 1;\n            string = (char *)pbVar10;\n            break;\n          }\n          if (sVar6 == 0) {\n            sVar6 = 1;\n          }\n          iVar5 = (*(code *)PTR_wcwidth_000375a0)(wc);\n          iVar7 = 0x7fffffff - iVar9;\n          if (iVar5 < 0) {\n            if ((flags & 2U) != 0) goto LAB_0001afe8;\n            iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc);\n            if ((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar9 = iVar9 + iVar5;\n            if (iVar7 < iVar5) {\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar5 = (*(code *)PTR_mbsinit_00037588)(&mbstate);\n          string = (char *)((byte *)string + sVar6);\n        } while (iVar5 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        string = (char *)((byte *)string + 1);\n        iVar9 = iVar9 + 1;\n      }\n    } while (string < pbVar10);\n  }\n  else {\n    iVar9 = 0;\n  }\nLAB_0001affc:\n  if (string_00 != *(char **)PTR___stack_chk_guard_0003758c) {\n    puVar11 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    sVar6 = (**(code **)(puVar11 + 0x1c448))();\n    iVar9 = mbsnwidth(string_00,sVar6,nbytes);\n    return iVar9;\n  }\n  return iVar9;\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 *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "byte *pbVar10;" type_identifier (pointer_declarator "*pbVar10" * identifier) ;) (declaration "undefined *puVar11;" type_identifier (pointer_declarator "*puVar11" * identifier) ;) (declaration "wchar_t wc;" type_identifier identifier ;) (declaration "mbstate_t mbstate;" type_identifier identifier ;) (expression_statement "string_00 = *(char **)PTR___stack_chk_guard_0003758c;" (assignment_expression "string_00 = *(char **)PTR___stack_chk_guard_0003758c" identifier = (pointer_expression "*(char **)PTR___stack_chk_guard_0003758c" * (cast_expression "(char **)PTR___stack_chk_guard_0003758c" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "pbVar10 = (byte *)(string + nbytes);" (assignment_expression "pbVar10 = (byte *)(string + nbytes)" identifier = (cast_expression "(byte *)(string + nbytes)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(string + nbytes)" ( (binary_expression "string + nbytes" identifier + identifier) )))) ;) (expression_statement "uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();" (assignment_expression "uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)()" identifier = (call_expression "(*(code *)PTR___ctype_get_mb_cur_max_00037544)()" (parenthesized_expression "(*(code *)PTR___ctype_get_mb_cur_max_00037544)" ( (pointer_expression "*(code *)PTR___ctype_get_mb_cur_max_00037544" * (cast_expression "(code *)PTR___ctype_get_mb_cur_max_00037544" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (uVar3 < 2) {\n    iVar9 = 0;\n    if (string < pbVar10) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar9 = 0;\n      nbytes = 0x7fffffff;\n      do {\n        pbVar8 = (byte *)string + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)(byte)*string * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) {\n            iVar9 = -1;\n            break;\n          }\n          iVar5 = iVar9;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar9 == 0x7fffffff) break;\n            iVar5 = iVar9 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar9 + 1;\n          if (iVar9 == 0x7fffffff) break;\n        }\n        iVar9 = iVar5;\n        string = (char *)pbVar8;\n      } while (pbVar10 != pbVar8);\n    }\n  }\n  else if (string < pbVar10) {\n    iVar9 = 0;\n    do {\n      iVar5 = (int)*string;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        mbstate.__count = 0;\n        mbstate.__value.__wch = 0;\n        do {\n          nbytes = (size_t)string;\n          sVar6 = rpl_mbrtowc(&wc,string,(int)pbVar10 - (int)string,&mbstate);\n          if (sVar6 == 0xffffffff) {\n            string = (char *)((byte *)string + 1);\n            if ((flags & 1U) != 0) {\nLAB_0001afe8:\n              iVar9 = -1;\n              goto LAB_0001affc;\n            }\n            iVar9 = iVar9 + 1;\n            break;\n          }\n          if (sVar6 == 0xfffffffe) {\n            if ((flags & 1U) != 0) goto LAB_0001afe8;\n            iVar9 = iVar9 + 1;\n            string = (char *)pbVar10;\n            break;\n          }\n          if (sVar6 == 0) {\n            sVar6 = 1;\n          }\n          iVar5 = (*(code *)PTR_wcwidth_000375a0)(wc);\n          iVar7 = 0x7fffffff - iVar9;\n          if (iVar5 < 0) {\n            if ((flags & 2U) != 0) goto LAB_0001afe8;\n            iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc);\n            if ((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar9 = iVar9 + iVar5;\n            if (iVar7 < iVar5) {\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar5 = (*(code *)PTR_mbsinit_00037588)(&mbstate);\n          string = (char *)((byte *)string + sVar6);\n        } while (iVar5 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        string = (char *)((byte *)string + 1);\n        iVar9 = iVar9 + 1;\n      }\n    } while (string < pbVar10);\n  }\n  else {\n    iVar9 = 0;\n  }" if (parenthesized_expression "(uVar3 < 2)" ( (binary_expression "uVar3 < 2" identifier < number_literal) )) (compound_statement "{\n    iVar9 = 0;\n    if (string < pbVar10) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar9 = 0;\n      nbytes = 0x7fffffff;\n      do {\n        pbVar8 = (byte *)string + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)(byte)*string * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) {\n            iVar9 = -1;\n            break;\n          }\n          iVar5 = iVar9;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar9 == 0x7fffffff) break;\n            iVar5 = iVar9 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar9 + 1;\n          if (iVar9 == 0x7fffffff) break;\n        }\n        iVar9 = iVar5;\n        string = (char *)pbVar8;\n      } while (pbVar10 != pbVar8);\n    }\n  }" { (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" identifier = number_literal) ;) (if_statement "if (string < pbVar10) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar9 = 0;\n      nbytes = 0x7fffffff;\n      do {\n        pbVar8 = (byte *)string + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)(byte)*string * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) {\n            iVar9 = -1;\n            break;\n          }\n          iVar5 = iVar9;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar9 == 0x7fffffff) break;\n            iVar5 = iVar9 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar9 + 1;\n          if (iVar9 == 0x7fffffff) break;\n        }\n        iVar9 = iVar5;\n        string = (char *)pbVar8;\n      } while (pbVar10 != pbVar8);\n    }" if (parenthesized_expression "(string < pbVar10)" ( (binary_expression "string < pbVar10" identifier < identifier) )) (compound_statement "{\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar9 = 0;\n      nbytes = 0x7fffffff;\n      do {\n        pbVar8 = (byte *)string + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)(byte)*string * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) {\n            iVar9 = -1;\n            break;\n          }\n          iVar5 = iVar9;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar9 == 0x7fffffff) break;\n            iVar5 = iVar9 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar9 + 1;\n          if (iVar9 == 0x7fffffff) break;\n        }\n        iVar9 = iVar5;\n        string = (char *)pbVar8;\n      } while (pbVar10 != pbVar8);\n    }" { (expression_statement "piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();" (assignment_expression "piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)()" identifier = (cast_expression "(int *)(*(code *)PTR___ctype_b_loc_00037448)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___ctype_b_loc_00037448)()" (parenthesized_expression "(*(code *)PTR___ctype_b_loc_00037448)" ( (pointer_expression "*(code *)PTR___ctype_b_loc_00037448" * (cast_expression "(code *)PTR___ctype_b_loc_00037448" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" identifier = number_literal) ;) (expression_statement "nbytes = 0x7fffffff;" (assignment_expression "nbytes = 0x7fffffff" identifier = number_literal) ;) (do_statement "do {\n        pbVar8 = (byte *)string + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)(byte)*string * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) {\n            iVar9 = -1;\n            break;\n          }\n          iVar5 = iVar9;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar9 == 0x7fffffff) break;\n            iVar5 = iVar9 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar9 + 1;\n          if (iVar9 == 0x7fffffff) break;\n        }\n        iVar9 = iVar5;\n        string = (char *)pbVar8;\n      } while (pbVar10 != pbVar8);" do (compound_statement "{\n        pbVar8 = (byte *)string + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)(byte)*string * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) {\n            iVar9 = -1;\n            break;\n          }\n          iVar5 = iVar9;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar9 == 0x7fffffff) break;\n            iVar5 = iVar9 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar9 + 1;\n          if (iVar9 == 0x7fffffff) break;\n        }\n        iVar9 = iVar5;\n        string = (char *)pbVar8;\n      }" { (expression_statement "pbVar8 = (byte *)string + 1;" (assignment_expression "pbVar8 = (byte *)string + 1" identifier = (binary_expression "(byte *)string + 1" (cast_expression "(byte *)string" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal)) ;) (expression_statement "uVar2 = *(ushort *)(*piVar4 + (uint)(byte)*string * 2);" (assignment_expression "uVar2 = *(ushort *)(*piVar4 + (uint)(byte)*string * 2)" identifier = (pointer_expression "*(ushort *)(*piVar4 + (uint)(byte)*string * 2)" * (cast_expression "(ushort *)(*piVar4 + (uint)(byte)*string * 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + (uint)(byte)*string * 2)" ( (binary_expression "*piVar4 + (uint)(byte)*string * 2" (pointer_expression "*piVar4" * identifier) + (binary_expression "(uint)(byte)*string * 2" (binary_expression "(uint)(byte)*string" (call_expression "(uint)(byte)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(byte)" ( identifier ))) * identifier) * number_literal)) ))))) ;) (if_statement "if ((uVar2 & 0x40) == 0) {\n          if ((flags & 2U) != 0) {\n            iVar9 = -1;\n            break;\n          }\n          iVar5 = iVar9;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar9 == 0x7fffffff) break;\n            iVar5 = iVar9 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar9 + 1;\n          if (iVar9 == 0x7fffffff) break;\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) {\n            iVar9 = -1;\n            break;\n          }\n          iVar5 = iVar9;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar9 == 0x7fffffff) break;\n            iVar5 = iVar9 + 1;\n          }\n        }" { (if_statement "if ((flags & 2U) != 0) {\n            iVar9 = -1;\n            break;\n          }" if (parenthesized_expression "((flags & 2U) != 0)" ( (binary_expression "(flags & 2U) != 0" (parenthesized_expression "(flags & 2U)" ( (binary_expression "flags & 2U" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n            iVar9 = -1;\n            break;\n          }" { (expression_statement "iVar9 = -1;" (assignment_expression "iVar9 = -1" identifier = number_literal) ;) (break_statement "break;" break ;) })) (expression_statement "iVar5 = iVar9;" (assignment_expression "iVar5 = iVar9" identifier = identifier) ;) (if_statement "if ((uVar2 & 0x200) == 0) {\n            if (iVar9 == 0x7fffffff) break;\n            iVar5 = iVar9 + 1;\n          }" if (parenthesized_expression "((uVar2 & 0x200) == 0)" ( (binary_expression "(uVar2 & 0x200) == 0" (parenthesized_expression "(uVar2 & 0x200)" ( (binary_expression "uVar2 & 0x200" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n            if (iVar9 == 0x7fffffff) break;\n            iVar5 = iVar9 + 1;\n          }" { (if_statement "if (iVar9 == 0x7fffffff) break;" if (parenthesized_expression "(iVar9 == 0x7fffffff)" ( (binary_expression "iVar9 == 0x7fffffff" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar5 = iVar9 + 1;" (assignment_expression "iVar5 = iVar9 + 1" identifier = (binary_expression "iVar9 + 1" identifier + number_literal)) ;) })) }) (else_clause "else {\n          iVar5 = iVar9 + 1;\n          if (iVar9 == 0x7fffffff) break;\n        }" else (compound_statement "{\n          iVar5 = iVar9 + 1;\n          if (iVar9 == 0x7fffffff) break;\n        }" { (expression_statement "iVar5 = iVar9 + 1;" (assignment_expression "iVar5 = iVar9 + 1" identifier = (binary_expression "iVar9 + 1" identifier + number_literal)) ;) (if_statement "if (iVar9 == 0x7fffffff) break;" if (parenthesized_expression "(iVar9 == 0x7fffffff)" ( (binary_expression "iVar9 == 0x7fffffff" identifier == number_literal) )) (break_statement "break;" break ;)) }))) (expression_statement "iVar9 = iVar5;" (assignment_expression "iVar9 = iVar5" identifier = identifier) ;) (expression_statement "string = (char *)pbVar8;" (assignment_expression "string = (char *)pbVar8" identifier = (cast_expression "(char *)pbVar8" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) }) while (parenthesized_expression "(pbVar10 != pbVar8)" ( (binary_expression "pbVar10 != pbVar8" identifier != identifier) )) ;) })) }) (else_clause "else if (string < pbVar10) {\n    iVar9 = 0;\n    do {\n      iVar5 = (int)*string;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        mbstate.__count = 0;\n        mbstate.__value.__wch = 0;\n        do {\n          nbytes = (size_t)string;\n          sVar6 = rpl_mbrtowc(&wc,string,(int)pbVar10 - (int)string,&mbstate);\n          if (sVar6 == 0xffffffff) {\n            string = (char *)((byte *)string + 1);\n            if ((flags & 1U) != 0) {\nLAB_0001afe8:\n              iVar9 = -1;\n              goto LAB_0001affc;\n            }\n            iVar9 = iVar9 + 1;\n            break;\n          }\n          if (sVar6 == 0xfffffffe) {\n            if ((flags & 1U) != 0) goto LAB_0001afe8;\n            iVar9 = iVar9 + 1;\n            string = (char *)pbVar10;\n            break;\n          }\n          if (sVar6 == 0) {\n            sVar6 = 1;\n          }\n          iVar5 = (*(code *)PTR_wcwidth_000375a0)(wc);\n          iVar7 = 0x7fffffff - iVar9;\n          if (iVar5 < 0) {\n            if ((flags & 2U) != 0) goto LAB_0001afe8;\n            iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc);\n            if ((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar9 = iVar9 + iVar5;\n            if (iVar7 < iVar5) {\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar5 = (*(code *)PTR_mbsinit_00037588)(&mbstate);\n          string = (char *)((byte *)string + sVar6);\n        } while (iVar5 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        string = (char *)((byte *)string + 1);\n        iVar9 = iVar9 + 1;\n      }\n    } while (string < pbVar10);\n  }\n  else {\n    iVar9 = 0;\n  }" else (if_statement "if (string < pbVar10) {\n    iVar9 = 0;\n    do {\n      iVar5 = (int)*string;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        mbstate.__count = 0;\n        mbstate.__value.__wch = 0;\n        do {\n          nbytes = (size_t)string;\n          sVar6 = rpl_mbrtowc(&wc,string,(int)pbVar10 - (int)string,&mbstate);\n          if (sVar6 == 0xffffffff) {\n            string = (char *)((byte *)string + 1);\n            if ((flags & 1U) != 0) {\nLAB_0001afe8:\n              iVar9 = -1;\n              goto LAB_0001affc;\n            }\n            iVar9 = iVar9 + 1;\n            break;\n          }\n          if (sVar6 == 0xfffffffe) {\n            if ((flags & 1U) != 0) goto LAB_0001afe8;\n            iVar9 = iVar9 + 1;\n            string = (char *)pbVar10;\n            break;\n          }\n          if (sVar6 == 0) {\n            sVar6 = 1;\n          }\n          iVar5 = (*(code *)PTR_wcwidth_000375a0)(wc);\n          iVar7 = 0x7fffffff - iVar9;\n          if (iVar5 < 0) {\n            if ((flags & 2U) != 0) goto LAB_0001afe8;\n            iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc);\n            if ((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar9 = iVar9 + iVar5;\n            if (iVar7 < iVar5) {\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar5 = (*(code *)PTR_mbsinit_00037588)(&mbstate);\n          string = (char *)((byte *)string + sVar6);\n        } while (iVar5 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        string = (char *)((byte *)string + 1);\n        iVar9 = iVar9 + 1;\n      }\n    } while (string < pbVar10);\n  }\n  else {\n    iVar9 = 0;\n  }" if (parenthesized_expression "(string < pbVar10)" ( (binary_expression "string < pbVar10" identifier < identifier) )) (compound_statement "{\n    iVar9 = 0;\n    do {\n      iVar5 = (int)*string;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        mbstate.__count = 0;\n        mbstate.__value.__wch = 0;\n        do {\n          nbytes = (size_t)string;\n          sVar6 = rpl_mbrtowc(&wc,string,(int)pbVar10 - (int)string,&mbstate);\n          if (sVar6 == 0xffffffff) {\n            string = (char *)((byte *)string + 1);\n            if ((flags & 1U) != 0) {\nLAB_0001afe8:\n              iVar9 = -1;\n              goto LAB_0001affc;\n            }\n            iVar9 = iVar9 + 1;\n            break;\n          }\n          if (sVar6 == 0xfffffffe) {\n            if ((flags & 1U) != 0) goto LAB_0001afe8;\n            iVar9 = iVar9 + 1;\n            string = (char *)pbVar10;\n            break;\n          }\n          if (sVar6 == 0) {\n            sVar6 = 1;\n          }\n          iVar5 = (*(code *)PTR_wcwidth_000375a0)(wc);\n          iVar7 = 0x7fffffff - iVar9;\n          if (iVar5 < 0) {\n            if ((flags & 2U) != 0) goto LAB_0001afe8;\n            iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc);\n            if ((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar9 = iVar9 + iVar5;\n            if (iVar7 < iVar5) {\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar5 = (*(code *)PTR_mbsinit_00037588)(&mbstate);\n          string = (char *)((byte *)string + sVar6);\n        } while (iVar5 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        string = (char *)((byte *)string + 1);\n        iVar9 = iVar9 + 1;\n      }\n    } while (string < pbVar10);\n  }" { (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar5 = (int)*string;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        mbstate.__count = 0;\n        mbstate.__value.__wch = 0;\n        do {\n          nbytes = (size_t)string;\n          sVar6 = rpl_mbrtowc(&wc,string,(int)pbVar10 - (int)string,&mbstate);\n          if (sVar6 == 0xffffffff) {\n            string = (char *)((byte *)string + 1);\n            if ((flags & 1U) != 0) {\nLAB_0001afe8:\n              iVar9 = -1;\n              goto LAB_0001affc;\n            }\n            iVar9 = iVar9 + 1;\n            break;\n          }\n          if (sVar6 == 0xfffffffe) {\n            if ((flags & 1U) != 0) goto LAB_0001afe8;\n            iVar9 = iVar9 + 1;\n            string = (char *)pbVar10;\n            break;\n          }\n          if (sVar6 == 0) {\n            sVar6 = 1;\n          }\n          iVar5 = (*(code *)PTR_wcwidth_000375a0)(wc);\n          iVar7 = 0x7fffffff - iVar9;\n          if (iVar5 < 0) {\n            if ((flags & 2U) != 0) goto LAB_0001afe8;\n            iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc);\n            if ((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar9 = iVar9 + iVar5;\n            if (iVar7 < iVar5) {\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar5 = (*(code *)PTR_mbsinit_00037588)(&mbstate);\n          string = (char *)((byte *)string + sVar6);\n        } while (iVar5 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        string = (char *)((byte *)string + 1);\n        iVar9 = iVar9 + 1;\n      }\n    } while (string < pbVar10);" do (compound_statement "{\n      iVar5 = (int)*string;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        mbstate.__count = 0;\n        mbstate.__value.__wch = 0;\n        do {\n          nbytes = (size_t)string;\n          sVar6 = rpl_mbrtowc(&wc,string,(int)pbVar10 - (int)string,&mbstate);\n          if (sVar6 == 0xffffffff) {\n            string = (char *)((byte *)string + 1);\n            if ((flags & 1U) != 0) {\nLAB_0001afe8:\n              iVar9 = -1;\n              goto LAB_0001affc;\n            }\n            iVar9 = iVar9 + 1;\n            break;\n          }\n          if (sVar6 == 0xfffffffe) {\n            if ((flags & 1U) != 0) goto LAB_0001afe8;\n            iVar9 = iVar9 + 1;\n            string = (char *)pbVar10;\n            break;\n          }\n          if (sVar6 == 0) {\n            sVar6 = 1;\n          }\n          iVar5 = (*(code *)PTR_wcwidth_000375a0)(wc);\n          iVar7 = 0x7fffffff - iVar9;\n          if (iVar5 < 0) {\n            if ((flags & 2U) != 0) goto LAB_0001afe8;\n            iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc);\n            if ((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar9 = iVar9 + iVar5;\n            if (iVar7 < iVar5) {\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar5 = (*(code *)PTR_mbsinit_00037588)(&mbstate);\n          string = (char *)((byte *)string + sVar6);\n        } while (iVar5 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        string = (char *)((byte *)string + 1);\n        iVar9 = iVar9 + 1;\n      }\n    }" { (expression_statement "iVar5 = (int)*string;" (assignment_expression "iVar5 = (int)*string" identifier = (cast_expression "(int)*string" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*string" * identifier))) ;) (if_statement "if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        mbstate.__count = 0;\n        mbstate.__value.__wch = 0;\n        do {\n          nbytes = (size_t)string;\n          sVar6 = rpl_mbrtowc(&wc,string,(int)pbVar10 - (int)string,&mbstate);\n          if (sVar6 == 0xffffffff) {\n            string = (char *)((byte *)string + 1);\n            if ((flags & 1U) != 0) {\nLAB_0001afe8:\n              iVar9 = -1;\n              goto LAB_0001affc;\n            }\n            iVar9 = iVar9 + 1;\n            break;\n          }\n          if (sVar6 == 0xfffffffe) {\n            if ((flags & 1U) != 0) goto LAB_0001afe8;\n            iVar9 = iVar9 + 1;\n            string = (char *)pbVar10;\n            break;\n          }\n          if (sVar6 == 0) {\n            sVar6 = 1;\n          }\n          iVar5 = (*(code *)PTR_wcwidth_000375a0)(wc);\n          iVar7 = 0x7fffffff - iVar9;\n          if (iVar5 < 0) {\n            if ((flags & 2U) != 0) goto LAB_0001afe8;\n            iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc);\n            if ((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar9 = iVar9 + iVar5;\n            if (iVar7 < iVar5) {\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar5 = (*(code *)PTR_mbsinit_00037588)(&mbstate);\n          string = (char *)((byte *)string + sVar6);\n        } while (iVar5 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        string = (char *)((byte *)string + 1);\n        iVar9 = iVar9 + 1;\n      }" if (parenthesized_expression "(iVar5 < 0x40)" ( (binary_expression "iVar5 < 0x40" identifier < number_literal) )) (compound_statement "{\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        mbstate.__count = 0;\n        mbstate.__value.__wch = 0;\n        do {\n          nbytes = (size_t)string;\n          sVar6 = rpl_mbrtowc(&wc,string,(int)pbVar10 - (int)string,&mbstate);\n          if (sVar6 == 0xffffffff) {\n            string = (char *)((byte *)string + 1);\n            if ((flags & 1U) != 0) {\nLAB_0001afe8:\n              iVar9 = -1;\n              goto LAB_0001affc;\n            }\n            iVar9 = iVar9 + 1;\n            break;\n          }\n          if (sVar6 == 0xfffffffe) {\n            if ((flags & 1U) != 0) goto LAB_0001afe8;\n            iVar9 = iVar9 + 1;\n            string = (char *)pbVar10;\n            break;\n          }\n          if (sVar6 == 0) {\n            sVar6 = 1;\n          }\n          iVar5 = (*(code *)PTR_wcwidth_000375a0)(wc);\n          iVar7 = 0x7fffffff - iVar9;\n          if (iVar5 < 0) {\n            if ((flags & 2U) != 0) goto LAB_0001afe8;\n            iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc);\n            if ((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar9 = iVar9 + iVar5;\n            if (iVar7 < iVar5) {\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar5 = (*(code *)PTR_mbsinit_00037588)(&mbstate);\n          string = (char *)((byte *)string + sVar6);\n        } while (iVar5 == 0);\n      }" { (if_statement "if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;" if (parenthesized_expression "((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4))" ( (binary_expression "(0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)" (parenthesized_expression "(0x24 < iVar5)" ( (binary_expression "0x24 < iVar5" number_literal < identifier) )) || (parenthesized_expression "((iVar5 - 0x20U & 0xff) < 4)" ( (binary_expression "(iVar5 - 0x20U & 0xff) < 4" (parenthesized_expression "(iVar5 - 0x20U & 0xff)" ( (binary_expression "iVar5 - 0x20U & 0xff" (binary_expression "iVar5 - 0x20U" identifier - number_literal) & number_literal) )) < number_literal) ))) )) (goto_statement "goto LAB_0001aeb8;" goto statement_identifier ;)) (labeled_statement "LAB_0001aef8:\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)pbVar10 - (int)string,&mbstate);\n          if (sVar6 == 0xffffffff) {\n            string = (char *)((byte *)string + 1);\n            if ((flags & 1U) != 0) {\nLAB_0001afe8:\n              iVar9 = -1;\n              goto LAB_0001affc;\n            }\n            iVar9 = iVar9 + 1;\n            break;\n          }\n          if (sVar6 == 0xfffffffe) {\n            if ((flags & 1U) != 0) goto LAB_0001afe8;\n            iVar9 = iVar9 + 1;\n            string = (char *)pbVar10;\n            break;\n          }\n          if (sVar6 == 0) {\n            sVar6 = 1;\n          }\n          iVar5 = (*(code *)PTR_wcwidth_000375a0)(wc);\n          iVar7 = 0x7fffffff - iVar9;\n          if (iVar5 < 0) {\n            if ((flags & 2U) != 0) goto LAB_0001afe8;\n            iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc);\n            if ((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar9 = iVar9 + iVar5;\n            if (iVar7 < iVar5) {\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar5 = (*(code *)PTR_mbsinit_00037588)(&mbstate);\n          string = (char *)((byte *)string + sVar6);\n        } while (iVar5 == 0);" do (compound_statement "{\n          nbytes = (size_t)string;\n          sVar6 = rpl_mbrtowc(&wc,string,(int)pbVar10 - (int)string,&mbstate);\n          if (sVar6 == 0xffffffff) {\n            string = (char *)((byte *)string + 1);\n            if ((flags & 1U) != 0) {\nLAB_0001afe8:\n              iVar9 = -1;\n              goto LAB_0001affc;\n            }\n            iVar9 = iVar9 + 1;\n            break;\n          }\n          if (sVar6 == 0xfffffffe) {\n            if ((flags & 1U) != 0) goto LAB_0001afe8;\n            iVar9 = iVar9 + 1;\n            string = (char *)pbVar10;\n            break;\n          }\n          if (sVar6 == 0) {\n            sVar6 = 1;\n          }\n          iVar5 = (*(code *)PTR_wcwidth_000375a0)(wc);\n          iVar7 = 0x7fffffff - iVar9;\n          if (iVar5 < 0) {\n            if ((flags & 2U) != 0) goto LAB_0001afe8;\n            iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc);\n            if ((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar9 = iVar9 + iVar5;\n            if (iVar7 < iVar5) {\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar5 = (*(code *)PTR_mbsinit_00037588)(&mbstate);\n          string = (char *)((byte *)string + sVar6);\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)pbVar10 - (int)string,&mbstate);" (assignment_expression "sVar6 = rpl_mbrtowc(&wc,string,(int)pbVar10 - (int)string,&mbstate)" identifier = (call_expression "rpl_mbrtowc(&wc,string,(int)pbVar10 - (int)string,&mbstate)" identifier (argument_list "(&wc,string,(int)pbVar10 - (int)string,&mbstate)" ( (pointer_expression "&wc" & identifier) , identifier , (binary_expression "(int)pbVar10 - (int)string" (cast_expression "(int)pbVar10" ( (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            string = (char *)((byte *)string + 1);\n            if ((flags & 1U) != 0) {\nLAB_0001afe8:\n              iVar9 = -1;\n              goto LAB_0001affc;\n            }\n            iVar9 = iVar9 + 1;\n            break;\n          }" if (parenthesized_expression "(sVar6 == 0xffffffff)" ( (binary_expression "sVar6 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n            string = (char *)((byte *)string + 1);\n            if ((flags & 1U) != 0) {\nLAB_0001afe8:\n              iVar9 = -1;\n              goto LAB_0001affc;\n            }\n            iVar9 = iVar9 + 1;\n            break;\n          }" { (expression_statement "string = (char *)((byte *)string + 1);" (assignment_expression "string = (char *)((byte *)string + 1)" identifier = (cast_expression "(char *)((byte *)string + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)string + 1)" ( (binary_expression "(byte *)string + 1" (cast_expression "(byte *)string" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) ;) (if_statement "if ((flags & 1U) != 0) {\nLAB_0001afe8:\n              iVar9 = -1;\n              goto LAB_0001affc;\n            }" if (parenthesized_expression "((flags & 1U) != 0)" ( (binary_expression "(flags & 1U) != 0" (parenthesized_expression "(flags & 1U)" ( (binary_expression "flags & 1U" identifier & number_literal) )) != number_literal) )) (compound_statement "{\nLAB_0001afe8:\n              iVar9 = -1;\n              goto LAB_0001affc;\n            }" { (labeled_statement "LAB_0001afe8:\n              iVar9 = -1;" statement_identifier : (expression_statement "iVar9 = -1;" (assignment_expression "iVar9 = -1" identifier = number_literal) ;)) (goto_statement "goto LAB_0001affc;" goto statement_identifier ;) })) (expression_statement "iVar9 = iVar9 + 1;" (assignment_expression "iVar9 = iVar9 + 1" identifier = (binary_expression "iVar9 + 1" identifier + number_literal)) ;) (break_statement "break;" break ;) })) (if_statement "if (sVar6 == 0xfffffffe) {\n            if ((flags & 1U) != 0) goto LAB_0001afe8;\n            iVar9 = iVar9 + 1;\n            string = (char *)pbVar10;\n            break;\n          }" if (parenthesized_expression "(sVar6 == 0xfffffffe)" ( (binary_expression "sVar6 == 0xfffffffe" identifier == number_literal) )) (compound_statement "{\n            if ((flags & 1U) != 0) goto LAB_0001afe8;\n            iVar9 = iVar9 + 1;\n            string = (char *)pbVar10;\n            break;\n          }" { (if_statement "if ((flags & 1U) != 0) goto LAB_0001afe8;" 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_0001afe8;" goto statement_identifier ;)) (expression_statement "iVar9 = iVar9 + 1;" (assignment_expression "iVar9 = iVar9 + 1" identifier = (binary_expression "iVar9 + 1" identifier + number_literal)) ;) (expression_statement "string = (char *)pbVar10;" (assignment_expression "string = (char *)pbVar10" identifier = (cast_expression "(char *)pbVar10" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) 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 "iVar5 = (*(code *)PTR_wcwidth_000375a0)(wc);" (assignment_expression "iVar5 = (*(code *)PTR_wcwidth_000375a0)(wc)" identifier = (call_expression "(*(code *)PTR_wcwidth_000375a0)(wc)" (parenthesized_expression "(*(code *)PTR_wcwidth_000375a0)" ( (pointer_expression "*(code *)PTR_wcwidth_000375a0" * (cast_expression "(code *)PTR_wcwidth_000375a0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(wc)" ( identifier )))) ;) (expression_statement "iVar7 = 0x7fffffff - iVar9;" (assignment_expression "iVar7 = 0x7fffffff - iVar9" identifier = (binary_expression "0x7fffffff - iVar9" number_literal - identifier)) ;) (if_statement "if (iVar5 < 0) {\n            if ((flags & 2U) != 0) goto LAB_0001afe8;\n            iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc);\n            if ((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar9 = iVar9 + iVar5;\n            if (iVar7 < iVar5) {\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }" if (parenthesized_expression "(iVar5 < 0)" ( (binary_expression "iVar5 < 0" identifier < number_literal) )) (compound_statement "{\n            if ((flags & 2U) != 0) goto LAB_0001afe8;\n            iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc);\n            if ((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))\n            goto LAB_0001aff0;\n          }" { (if_statement "if ((flags & 2U) != 0) goto LAB_0001afe8;" 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_0001afe8;" goto statement_identifier ;)) (expression_statement "iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc);" (assignment_expression "iVar5 = (*(code *)PTR_iswcntrl_00037568)(wc)" identifier = (call_expression "(*(code *)PTR_iswcntrl_00037568)(wc)" (parenthesized_expression "(*(code *)PTR_iswcntrl_00037568)" ( (pointer_expression "*(code *)PTR_iswcntrl_00037568" * (cast_expression "(code *)PTR_iswcntrl_00037568" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(wc)" ( identifier )))) ;) (if_statement "if ((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))\n            goto LAB_0001aff0;" if (parenthesized_expression "((iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1))" ( (binary_expression "(iVar5 == 0) && (bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1)" (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) && (parenthesized_expression "(bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1)" ( (comma_expression "bVar1 = iVar9 == 0x7fffffff, iVar9 = iVar9 + 1, bVar1" (assignment_expression "bVar1 = iVar9 == 0x7fffffff" identifier = (binary_expression "iVar9 == 0x7fffffff" identifier == number_literal)) , (comma_expression "iVar9 = iVar9 + 1, bVar1" (assignment_expression "iVar9 = iVar9 + 1" identifier = (binary_expression "iVar9 + 1" identifier + number_literal)) , identifier)) ))) )) (goto_statement "goto LAB_0001aff0;" goto statement_identifier ;)) }) (else_clause "else {\n            iVar9 = iVar9 + iVar5;\n            if (iVar7 < iVar5) {\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }" else (compound_statement "{\n            iVar9 = iVar9 + iVar5;\n            if (iVar7 < iVar5) {\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }" { (expression_statement "iVar9 = iVar9 + iVar5;" (assignment_expression "iVar9 = iVar9 + iVar5" identifier = (binary_expression "iVar9 + iVar5" identifier + identifier)) ;) (if_statement "if (iVar7 < iVar5) {\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }" if (parenthesized_expression "(iVar7 < iVar5)" ( (binary_expression "iVar7 < iVar5" identifier < identifier) )) (compound_statement "{\nLAB_0001aff0:\n              iVar9 = 0x7fffffff;\n              goto LAB_0001affc;\n            }" { (labeled_statement "LAB_0001aff0:\n              iVar9 = 0x7fffffff;" statement_identifier : (expression_statement "iVar9 = 0x7fffffff;" (assignment_expression "iVar9 = 0x7fffffff" identifier = number_literal) ;)) (goto_statement "goto LAB_0001affc;" goto statement_identifier ;) })) }))) (expression_statement "iVar5 = (*(code *)PTR_mbsinit_00037588)(&mbstate);" (assignment_expression "iVar5 = (*(code *)PTR_mbsinit_00037588)(&mbstate)" identifier = (call_expression "(*(code *)PTR_mbsinit_00037588)(&mbstate)" (parenthesized_expression "(*(code *)PTR_mbsinit_00037588)" ( (pointer_expression "*(code *)PTR_mbsinit_00037588" * (cast_expression "(code *)PTR_mbsinit_00037588" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(&mbstate)" ( (pointer_expression "&mbstate" & identifier) )))) ;) (expression_statement "string = (char *)((byte *)string + sVar6);" (assignment_expression "string = (char *)((byte *)string + sVar6)" identifier = (cast_expression "(char *)((byte *)string + sVar6)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)string + sVar6)" ( (binary_expression "(byte *)string + sVar6" (cast_expression "(byte *)string" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + identifier) )))) ;) }) while (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) ;) }) (else_clause "else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        string = (char *)((byte *)string + 1);\n        iVar9 = iVar9 + 1;\n      }" else (compound_statement "{\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        string = (char *)((byte *)string + 1);\n        iVar9 = iVar9 + 1;\n      }" { (if_statement "if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;" if (parenthesized_expression "((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))" ( (binary_expression "(iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff))))" (parenthesized_expression "(iVar5 < 0x41)" ( (binary_expression "iVar5 < 0x41" identifier < number_literal) )) || (parenthesized_expression "((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff))))" ( (parenthesized_expression "(0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))" ( (binary_expression "0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff))" (binary_expression "0x5f < iVar5" number_literal < identifier) && (parenthesized_expression "(0x1d < (iVar5 - 0x61U & 0xff))" ( (binary_expression "0x1d < (iVar5 - 0x61U & 0xff)" number_literal < (parenthesized_expression "(iVar5 - 0x61U & 0xff)" ( (binary_expression "iVar5 - 0x61U & 0xff" (binary_expression "iVar5 - 0x61U" identifier - number_literal) & number_literal) ))) ))) )) ))) )) (goto_statement "goto LAB_0001aef8;" goto statement_identifier ;)) (labeled_statement "LAB_0001aeb8:\n        string = (char *)((byte *)string + 1);" statement_identifier : (expression_statement "string = (char *)((byte *)string + 1);" (assignment_expression "string = (char *)((byte *)string + 1)" identifier = (cast_expression "(char *)((byte *)string + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)string + 1)" ( (binary_expression "(byte *)string + 1" (cast_expression "(byte *)string" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) ;)) (expression_statement "iVar9 = iVar9 + 1;" (assignment_expression "iVar9 = iVar9 + 1" identifier = (binary_expression "iVar9 + 1" identifier + number_literal)) ;) }))) }) while (parenthesized_expression "(string < pbVar10)" ( (binary_expression "string < pbVar10" identifier < identifier) )) ;) }) (else_clause "else {\n    iVar9 = 0;\n  }" else (compound_statement "{\n    iVar9 = 0;\n  }" { (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" identifier = number_literal) ;) }))))) (labeled_statement "LAB_0001affc:\n  if (string_00 != *(char **)PTR___stack_chk_guard_0003758c) {\n    puVar11 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    sVar6 = (**(code **)(puVar11 + 0x1c448))();\n    iVar9 = mbsnwidth(string_00,sVar6,nbytes);\n    return iVar9;\n  }" statement_identifier : (if_statement "if (string_00 != *(char **)PTR___stack_chk_guard_0003758c) {\n    puVar11 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    sVar6 = (**(code **)(puVar11 + 0x1c448))();\n    iVar9 = mbsnwidth(string_00,sVar6,nbytes);\n    return iVar9;\n  }" if (parenthesized_expression "(string_00 != *(char **)PTR___stack_chk_guard_0003758c)" ( (binary_expression "string_00 != *(char **)PTR___stack_chk_guard_0003758c" identifier != (pointer_expression "*(char **)PTR___stack_chk_guard_0003758c" * (cast_expression "(char **)PTR___stack_chk_guard_0003758c" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) )) (compound_statement "{\n    puVar11 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    sVar6 = (**(code **)(puVar11 + 0x1c448))();\n    iVar9 = mbsnwidth(string_00,sVar6,nbytes);\n    return iVar9;\n  }" { (expression_statement "puVar11 = PTR___stack_chk_fail_0003756c;" (assignment_expression "puVar11 = PTR___stack_chk_fail_0003756c" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_0003756c)();" (call_expression "(*(code *)PTR___stack_chk_fail_0003756c)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_0003756c)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_0003756c" * (cast_expression "(code *)PTR___stack_chk_fail_0003756c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "sVar6 = (**(code **)(puVar11 + 0x1c448))();" (assignment_expression "sVar6 = (**(code **)(puVar11 + 0x1c448))()" identifier = (call_expression "(**(code **)(puVar11 + 0x1c448))()" (parenthesized_expression "(**(code **)(puVar11 + 0x1c448))" ( (pointer_expression "**(code **)(puVar11 + 0x1c448)" * (pointer_expression "*(code **)(puVar11 + 0x1c448)" * (cast_expression "(code **)(puVar11 + 0x1c448)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar11 + 0x1c448)" ( (binary_expression "puVar11 + 0x1c448" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (expression_statement "iVar9 = mbsnwidth(string_00,sVar6,nbytes);" (assignment_expression "iVar9 = 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 iVar9;" return identifier ;) }))) (return_statement "return iVar9;" return identifier ;) })))
(translation_unit "int mbsnwidth(byte *param_1,byte *param_2,uint param_3)\n\n{\n  bool bVar1;\n  ushort uVar2;\n  uint uVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  int iVar8;\n  byte *pbVar9;\n  int iVar10;\n  byte *pbVar11;\n  undefined *puVar12;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  local_2c = *(int *)PTR___stack_chk_guard_0003758c;\n  pbVar11 = param_1 + (int)param_2;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();\n  if (uVar3 < 2) {\n    iVar10 = 0;\n    if (param_1 < pbVar11) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }\n  }\n  else if (param_1 < pbVar11) {\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }\n  else {\n    iVar10 = 0;\n  }\nLAB_0001affc:\n  if (local_2c != *(int *)PTR___stack_chk_guard_0003758c) {\n    iVar10 = local_2c;\n    puVar12 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    uVar7 = (**(code **)(puVar12 + 0x1c448))();\n    iVar10 = mbsnwidth(iVar10,uVar7,param_2);\n    return iVar10;\n  }\n  return iVar10;\n}\n\n" (function_definition "int mbsnwidth(byte *param_1,byte *param_2,uint param_3)\n\n{\n  bool bVar1;\n  ushort uVar2;\n  uint uVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  int iVar8;\n  byte *pbVar9;\n  int iVar10;\n  byte *pbVar11;\n  undefined *puVar12;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  local_2c = *(int *)PTR___stack_chk_guard_0003758c;\n  pbVar11 = param_1 + (int)param_2;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();\n  if (uVar3 < 2) {\n    iVar10 = 0;\n    if (param_1 < pbVar11) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }\n  }\n  else if (param_1 < pbVar11) {\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }\n  else {\n    iVar10 = 0;\n  }\nLAB_0001affc:\n  if (local_2c != *(int *)PTR___stack_chk_guard_0003758c) {\n    iVar10 = local_2c;\n    puVar12 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    uVar7 = (**(code **)(puVar12 + 0x1c448))();\n    iVar10 = mbsnwidth(iVar10,uVar7,param_2);\n    return iVar10;\n  }\n  return iVar10;\n}" primitive_type (function_declarator "mbsnwidth(byte *param_1,byte *param_2,uint param_3)" identifier (parameter_list "(byte *param_1,byte *param_2,uint param_3)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "byte *param_2" type_identifier (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 *piVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  int iVar8;\n  byte *pbVar9;\n  int iVar10;\n  byte *pbVar11;\n  undefined *puVar12;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  local_2c = *(int *)PTR___stack_chk_guard_0003758c;\n  pbVar11 = param_1 + (int)param_2;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();\n  if (uVar3 < 2) {\n    iVar10 = 0;\n    if (param_1 < pbVar11) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }\n  }\n  else if (param_1 < pbVar11) {\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }\n  else {\n    iVar10 = 0;\n  }\nLAB_0001affc:\n  if (local_2c != *(int *)PTR___stack_chk_guard_0003758c) {\n    iVar10 = local_2c;\n    puVar12 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    uVar7 = (**(code **)(puVar12 + 0x1c448))();\n    iVar10 = mbsnwidth(iVar10,uVar7,param_2);\n    return iVar10;\n  }\n  return iVar10;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "ushort uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined4 uVar7;" type_identifier identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "byte *pbVar9;" type_identifier (pointer_declarator "*pbVar9" * identifier) ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "byte *pbVar11;" type_identifier (pointer_declarator "*pbVar11" * identifier) ;) (declaration "undefined *puVar12;" type_identifier (pointer_declarator "*puVar12" * 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 "local_2c = *(int *)PTR___stack_chk_guard_0003758c;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_0003758c" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_0003758c" * (cast_expression "(int *)PTR___stack_chk_guard_0003758c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "pbVar11 = param_1 + (int)param_2;" (assignment_expression "pbVar11 = 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 "uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();" (assignment_expression "uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)()" identifier = (call_expression "(*(code *)PTR___ctype_get_mb_cur_max_00037544)()" (parenthesized_expression "(*(code *)PTR___ctype_get_mb_cur_max_00037544)" ( (pointer_expression "*(code *)PTR___ctype_get_mb_cur_max_00037544" * (cast_expression "(code *)PTR___ctype_get_mb_cur_max_00037544" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (if_statement "if (uVar3 < 2) {\n    iVar10 = 0;\n    if (param_1 < pbVar11) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }\n  }\n  else if (param_1 < pbVar11) {\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }\n  else {\n    iVar10 = 0;\n  }" if (parenthesized_expression "(uVar3 < 2)" ( (binary_expression "uVar3 < 2" identifier < number_literal) )) (compound_statement "{\n    iVar10 = 0;\n    if (param_1 < pbVar11) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }\n  }" { (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (if_statement "if (param_1 < pbVar11) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }" if (parenthesized_expression "(param_1 < pbVar11)" ( (binary_expression "param_1 < pbVar11" identifier < identifier) )) (compound_statement "{\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }" { (expression_statement "piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();" (assignment_expression "piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)()" identifier = (cast_expression "(int *)(*(code *)PTR___ctype_b_loc_00037448)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___ctype_b_loc_00037448)()" (parenthesized_expression "(*(code *)PTR___ctype_b_loc_00037448)" ( (pointer_expression "*(code *)PTR___ctype_b_loc_00037448" * (cast_expression "(code *)PTR___ctype_b_loc_00037448" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (expression_statement "param_2 = (byte *)0x7fffffff;" (assignment_expression "param_2 = (byte *)0x7fffffff" identifier = (cast_expression "(byte *)0x7fffffff" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (do_statement "do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);" do (compound_statement "{\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      }" { (expression_statement "pbVar9 = param_1 + 1;" (assignment_expression "pbVar9 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);" (assignment_expression "uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2)" identifier = (pointer_expression "*(ushort *)(*piVar4 + (uint)*param_1 * 2)" * (cast_expression "(ushort *)(*piVar4 + (uint)*param_1 * 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + (uint)*param_1 * 2)" ( (binary_expression "*piVar4 + (uint)*param_1 * 2" (pointer_expression "*piVar4" * identifier) + (binary_expression "(uint)*param_1 * 2" (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" ( identifier )) * identifier) * number_literal)) ))))) ;) (if_statement "if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\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) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }" { (if_statement "if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }" 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) )) (compound_statement "{\n            iVar10 = -1;\n            break;\n          }" { (expression_statement "iVar10 = -1;" (assignment_expression "iVar10 = -1" identifier = number_literal) ;) (break_statement "break;" break ;) })) (expression_statement "iVar5 = iVar10;" (assignment_expression "iVar5 = iVar10" identifier = identifier) ;) (if_statement "if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }" if (parenthesized_expression "((uVar2 & 0x200) == 0)" ( (binary_expression "(uVar2 & 0x200) == 0" (parenthesized_expression "(uVar2 & 0x200)" ( (binary_expression "uVar2 & 0x200" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }" { (if_statement "if (iVar10 == 0x7fffffff) break;" if (parenthesized_expression "(iVar10 == 0x7fffffff)" ( (binary_expression "iVar10 == 0x7fffffff" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar5 = iVar10 + 1;" (assignment_expression "iVar5 = iVar10 + 1" identifier = (binary_expression "iVar10 + 1" identifier + number_literal)) ;) })) }) (else_clause "else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }" else (compound_statement "{\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }" { (expression_statement "iVar5 = iVar10 + 1;" (assignment_expression "iVar5 = iVar10 + 1" identifier = (binary_expression "iVar10 + 1" identifier + number_literal)) ;) (if_statement "if (iVar10 == 0x7fffffff) break;" if (parenthesized_expression "(iVar10 == 0x7fffffff)" ( (binary_expression "iVar10 == 0x7fffffff" identifier == number_literal) )) (break_statement "break;" break ;)) }))) (expression_statement "iVar10 = iVar5;" (assignment_expression "iVar10 = iVar5" identifier = identifier) ;) (expression_statement "param_1 = pbVar9;" (assignment_expression "param_1 = pbVar9" identifier = identifier) ;) }) while (parenthesized_expression "(pbVar11 != pbVar9)" ( (binary_expression "pbVar11 != pbVar9" identifier != identifier) )) ;) })) }) (else_clause "else if (param_1 < pbVar11) {\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }\n  else {\n    iVar10 = 0;\n  }" else (if_statement "if (param_1 < pbVar11) {\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }\n  else {\n    iVar10 = 0;\n  }" if (parenthesized_expression "(param_1 < pbVar11)" ( (binary_expression "param_1 < pbVar11" identifier < identifier) )) (compound_statement "{\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }" { (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);" do (compound_statement "{\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    }" { (expression_statement "iVar5 = (int)(char)*param_1;" (assignment_expression "iVar5 = (int)(char)*param_1" identifier = (cast_expression "(int)(char)*param_1" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)*param_1" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_1" * identifier)))) ;) (if_statement "if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }" if (parenthesized_expression "(iVar5 < 0x40)" ( (binary_expression "iVar5 < 0x40" identifier < number_literal) )) (compound_statement "{\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }" { (if_statement "if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;" if (parenthesized_expression "((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4))" ( (binary_expression "(0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)" (parenthesized_expression "(0x24 < iVar5)" ( (binary_expression "0x24 < iVar5" number_literal < identifier) )) || (parenthesized_expression "((iVar5 - 0x20U & 0xff) < 4)" ( (binary_expression "(iVar5 - 0x20U & 0xff) < 4" (parenthesized_expression "(iVar5 - 0x20U & 0xff)" ( (binary_expression "iVar5 - 0x20U & 0xff" (binary_expression "iVar5 - 0x20U" identifier - number_literal) & number_literal) )) < number_literal) ))) )) (goto_statement "goto LAB_0001aeb8;" goto statement_identifier ;)) (labeled_statement "LAB_0001aef8:\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          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);" do (compound_statement "{\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        }" { (expression_statement "param_2 = param_1;" (assignment_expression "param_2 = param_1" identifier = identifier) ;) (expression_statement "iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);" (assignment_expression "iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34)" identifier = (call_expression "rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34)" identifier (argument_list "(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34)" ( (pointer_expression "&local_38" & identifier) , identifier , (binary_expression "(int)pbVar11 - (int)param_1" (cast_expression "(int)pbVar11" ( (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 (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }" if (parenthesized_expression "(iVar5 == -1)" ( (binary_expression "iVar5 == -1" identifier == number_literal) )) (compound_statement "{\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }" { (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (if_statement "if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }" 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) )) (compound_statement "{\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }" { (labeled_statement "LAB_0001afe8:\n              iVar10 = -1;" statement_identifier : (expression_statement "iVar10 = -1;" (assignment_expression "iVar10 = -1" identifier = number_literal) ;)) (goto_statement "goto LAB_0001affc;" goto statement_identifier ;) })) (expression_statement "iVar10 = iVar10 + 1;" (assignment_expression "iVar10 = iVar10 + 1" identifier = (binary_expression "iVar10 + 1" identifier + number_literal)) ;) (break_statement "break;" break ;) })) (if_statement "if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }" if (parenthesized_expression "(iVar5 == -2)" ( (binary_expression "iVar5 == -2" identifier == number_literal) )) (compound_statement "{\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }" { (if_statement "if ((param_3 & 1) != 0) goto LAB_0001afe8;" 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_0001afe8;" goto statement_identifier ;)) (expression_statement "iVar10 = iVar10 + 1;" (assignment_expression "iVar10 = iVar10 + 1" identifier = (binary_expression "iVar10 + 1" identifier + number_literal)) ;) (expression_statement "param_1 = pbVar11;" (assignment_expression "param_1 = pbVar11" identifier = identifier) ;) (break_statement "break;" break ;) })) (if_statement "if (iVar5 == 0) {\n            iVar5 = 1;\n          }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n            iVar5 = 1;\n          }" { (expression_statement "iVar5 = 1;" (assignment_expression "iVar5 = 1" identifier = number_literal) ;) })) (expression_statement "iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);" (assignment_expression "iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38)" identifier = (call_expression "(*(code *)PTR_wcwidth_000375a0)(local_38)" (parenthesized_expression "(*(code *)PTR_wcwidth_000375a0)" ( (pointer_expression "*(code *)PTR_wcwidth_000375a0" * (cast_expression "(code *)PTR_wcwidth_000375a0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(local_38)" ( identifier )))) ;) (expression_statement "iVar8 = 0x7fffffff - iVar10;" (assignment_expression "iVar8 = 0x7fffffff - iVar10" identifier = (binary_expression "0x7fffffff - iVar10" number_literal - identifier)) ;) (if_statement "if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }" if (parenthesized_expression "(iVar6 < 0)" ( (binary_expression "iVar6 < 0" identifier < number_literal) )) (compound_statement "{\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }" { (if_statement "if ((param_3 & 2) != 0) goto LAB_0001afe8;" 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_0001afe8;" goto statement_identifier ;)) (expression_statement "iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);" (assignment_expression "iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38)" identifier = (call_expression "(*(code *)PTR_iswcntrl_00037568)(local_38)" (parenthesized_expression "(*(code *)PTR_iswcntrl_00037568)" ( (pointer_expression "*(code *)PTR_iswcntrl_00037568" * (cast_expression "(code *)PTR_iswcntrl_00037568" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(local_38)" ( identifier )))) ;) (if_statement "if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;" if (parenthesized_expression "((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))" ( (binary_expression "(iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1)" (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) && (parenthesized_expression "(bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1)" ( (comma_expression "bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1" (assignment_expression "bVar1 = iVar10 == 0x7fffffff" identifier = (binary_expression "iVar10 == 0x7fffffff" identifier == number_literal)) , (comma_expression "iVar10 = iVar10 + 1, bVar1" (assignment_expression "iVar10 = iVar10 + 1" identifier = (binary_expression "iVar10 + 1" identifier + number_literal)) , identifier)) ))) )) (goto_statement "goto LAB_0001aff0;" goto statement_identifier ;)) }) (else_clause "else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }" else (compound_statement "{\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }" { (expression_statement "iVar10 = iVar10 + iVar6;" (assignment_expression "iVar10 = iVar10 + iVar6" identifier = (binary_expression "iVar10 + iVar6" identifier + identifier)) ;) (if_statement "if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }" if (parenthesized_expression "(iVar8 < iVar6)" ( (binary_expression "iVar8 < iVar6" identifier < identifier) )) (compound_statement "{\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }" { (labeled_statement "LAB_0001aff0:\n              iVar10 = 0x7fffffff;" statement_identifier : (expression_statement "iVar10 = 0x7fffffff;" (assignment_expression "iVar10 = 0x7fffffff" identifier = number_literal) ;)) (goto_statement "goto LAB_0001affc;" goto statement_identifier ;) })) }))) (expression_statement "iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);" (assignment_expression "iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34)" identifier = (call_expression "(*(code *)PTR_mbsinit_00037588)(&local_34)" (parenthesized_expression "(*(code *)PTR_mbsinit_00037588)" ( (pointer_expression "*(code *)PTR_mbsinit_00037588" * (cast_expression "(code *)PTR_mbsinit_00037588" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(&local_34)" ( (pointer_expression "&local_34" & identifier) )))) ;) (expression_statement "param_1 = param_1 + iVar5;" (assignment_expression "param_1 = param_1 + iVar5" identifier = (binary_expression "param_1 + iVar5" identifier + identifier)) ;) }) while (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) ;) }) (else_clause "else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }" else (compound_statement "{\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }" { (if_statement "if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;" if (parenthesized_expression "((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))" ( (binary_expression "(iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff))))" (parenthesized_expression "(iVar5 < 0x41)" ( (binary_expression "iVar5 < 0x41" identifier < number_literal) )) || (parenthesized_expression "((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff))))" ( (parenthesized_expression "(0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))" ( (binary_expression "0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff))" (binary_expression "0x5f < iVar5" number_literal < identifier) && (parenthesized_expression "(0x1d < (iVar5 - 0x61U & 0xff))" ( (binary_expression "0x1d < (iVar5 - 0x61U & 0xff)" number_literal < (parenthesized_expression "(iVar5 - 0x61U & 0xff)" ( (binary_expression "iVar5 - 0x61U & 0xff" (binary_expression "iVar5 - 0x61U" identifier - number_literal) & number_literal) ))) ))) )) ))) )) (goto_statement "goto LAB_0001aef8;" goto statement_identifier ;)) (labeled_statement "LAB_0001aeb8:\n        param_1 = param_1 + 1;" statement_identifier : (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 "iVar10 = iVar10 + 1;" (assignment_expression "iVar10 = iVar10 + 1" identifier = (binary_expression "iVar10 + 1" identifier + number_literal)) ;) }))) }) while (parenthesized_expression "(param_1 < pbVar11)" ( (binary_expression "param_1 < pbVar11" identifier < identifier) )) ;) }) (else_clause "else {\n    iVar10 = 0;\n  }" else (compound_statement "{\n    iVar10 = 0;\n  }" { (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) }))))) (labeled_statement "LAB_0001affc:\n  if (local_2c != *(int *)PTR___stack_chk_guard_0003758c) {\n    iVar10 = local_2c;\n    puVar12 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    uVar7 = (**(code **)(puVar12 + 0x1c448))();\n    iVar10 = mbsnwidth(iVar10,uVar7,param_2);\n    return iVar10;\n  }" statement_identifier : (if_statement "if (local_2c != *(int *)PTR___stack_chk_guard_0003758c) {\n    iVar10 = local_2c;\n    puVar12 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    uVar7 = (**(code **)(puVar12 + 0x1c448))();\n    iVar10 = mbsnwidth(iVar10,uVar7,param_2);\n    return iVar10;\n  }" if (parenthesized_expression "(local_2c != *(int *)PTR___stack_chk_guard_0003758c)" ( (binary_expression "local_2c != *(int *)PTR___stack_chk_guard_0003758c" identifier != (pointer_expression "*(int *)PTR___stack_chk_guard_0003758c" * (cast_expression "(int *)PTR___stack_chk_guard_0003758c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    iVar10 = local_2c;\n    puVar12 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    uVar7 = (**(code **)(puVar12 + 0x1c448))();\n    iVar10 = mbsnwidth(iVar10,uVar7,param_2);\n    return iVar10;\n  }" { (expression_statement "iVar10 = local_2c;" (assignment_expression "iVar10 = local_2c" identifier = identifier) ;) (expression_statement "puVar12 = PTR___stack_chk_fail_0003756c;" (assignment_expression "puVar12 = PTR___stack_chk_fail_0003756c" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_0003756c)();" (call_expression "(*(code *)PTR___stack_chk_fail_0003756c)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_0003756c)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_0003756c" * (cast_expression "(code *)PTR___stack_chk_fail_0003756c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "uVar7 = (**(code **)(puVar12 + 0x1c448))();" (assignment_expression "uVar7 = (**(code **)(puVar12 + 0x1c448))()" identifier = (call_expression "(**(code **)(puVar12 + 0x1c448))()" (parenthesized_expression "(**(code **)(puVar12 + 0x1c448))" ( (pointer_expression "**(code **)(puVar12 + 0x1c448)" * (pointer_expression "*(code **)(puVar12 + 0x1c448)" * (cast_expression "(code **)(puVar12 + 0x1c448)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar12 + 0x1c448)" ( (binary_expression "puVar12 + 0x1c448" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (expression_statement "iVar10 = mbsnwidth(iVar10,uVar7,param_2);" (assignment_expression "iVar10 = mbsnwidth(iVar10,uVar7,param_2)" identifier = (call_expression "mbsnwidth(iVar10,uVar7,param_2)" identifier (argument_list "(iVar10,uVar7,param_2)" ( identifier , identifier , identifier )))) ;) (return_statement "return iVar10;" return identifier ;) }))) (return_statement "return iVar10;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * 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 = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) 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 = (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 = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * IDENT) * 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) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (break_statement break ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) }))) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (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 { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (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 + LIT)) ;) (break_statement break ;) })) (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 )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression LIT - 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 (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression IDENT == LIT)) , (comma_expression (assignment_expression IDENT = (binary_expression IDENT + LIT)) , IDENT)) ))) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = 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 ( (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + 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) )) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))))) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) 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 ;) })))
(function_definition "int mbsnwidth(byte *param_1,byte *param_2,uint param_3)\n\n{\n  bool bVar1;\n  ushort uVar2;\n  uint uVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  int iVar8;\n  byte *pbVar9;\n  int iVar10;\n  byte *pbVar11;\n  undefined *puVar12;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  local_2c = *(int *)PTR___stack_chk_guard_0003758c;\n  pbVar11 = param_1 + (int)param_2;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();\n  if (uVar3 < 2) {\n    iVar10 = 0;\n    if (param_1 < pbVar11) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }\n  }\n  else if (param_1 < pbVar11) {\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }\n  else {\n    iVar10 = 0;\n  }\nLAB_0001affc:\n  if (local_2c != *(int *)PTR___stack_chk_guard_0003758c) {\n    iVar10 = local_2c;\n    puVar12 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    uVar7 = (**(code **)(puVar12 + 0x1c448))();\n    iVar10 = mbsnwidth(iVar10,uVar7,param_2);\n    return iVar10;\n  }\n  return iVar10;\n}" (primitive_type "int") (function_declarator "mbsnwidth(byte *param_1,byte *param_2,uint param_3)" (identifier "mbsnwidth") (parameter_list "(byte *param_1,byte *param_2,uint param_3)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "byte *param_2" (type_identifier "byte") (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 *piVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  int iVar8;\n  byte *pbVar9;\n  int iVar10;\n  byte *pbVar11;\n  undefined *puVar12;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  local_2c = *(int *)PTR___stack_chk_guard_0003758c;\n  pbVar11 = param_1 + (int)param_2;\n  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();\n  if (uVar3 < 2) {\n    iVar10 = 0;\n    if (param_1 < pbVar11) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }\n  }\n  else if (param_1 < pbVar11) {\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }\n  else {\n    iVar10 = 0;\n  }\nLAB_0001affc:\n  if (local_2c != *(int *)PTR___stack_chk_guard_0003758c) {\n    iVar10 = local_2c;\n    puVar12 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    uVar7 = (**(code **)(puVar12 + 0x1c448))();\n    iVar10 = mbsnwidth(iVar10,uVar7,param_2);\n    return iVar10;\n  }\n  return iVar10;\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 *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "undefined4 uVar7;" (type_identifier "undefined4") (identifier "uVar7") (; ";")) (declaration "int iVar8;" (primitive_type "int") (identifier "iVar8") (; ";")) (declaration "byte *pbVar9;" (type_identifier "byte") (pointer_declarator "*pbVar9" (* "*") (identifier "pbVar9")) (; ";")) (declaration "int iVar10;" (primitive_type "int") (identifier "iVar10") (; ";")) (declaration "byte *pbVar11;" (type_identifier "byte") (pointer_declarator "*pbVar11" (* "*") (identifier "pbVar11")) (; ";")) (declaration "undefined *puVar12;" (type_identifier "undefined") (pointer_declarator "*puVar12" (* "*") (identifier "puVar12")) (; ";")) (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 "local_2c = *(int *)PTR___stack_chk_guard_0003758c;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_0003758c" (identifier "local_2c") (= "=") (pointer_expression "*(int *)PTR___stack_chk_guard_0003758c" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_0003758c" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_0003758c")))) (; ";")) (expression_statement "pbVar11 = param_1 + (int)param_2;" (assignment_expression "pbVar11 = param_1 + (int)param_2" (identifier "pbVar11") (= "=") (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 "uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();" (assignment_expression "uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)()" (identifier "uVar3") (= "=") (call_expression "(*(code *)PTR___ctype_get_mb_cur_max_00037544)()" (parenthesized_expression "(*(code *)PTR___ctype_get_mb_cur_max_00037544)" (( "(") (pointer_expression "*(code *)PTR___ctype_get_mb_cur_max_00037544" (* "*") (cast_expression "(code *)PTR___ctype_get_mb_cur_max_00037544" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___ctype_get_mb_cur_max_00037544"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (uVar3 < 2) {\n    iVar10 = 0;\n    if (param_1 < pbVar11) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }\n  }\n  else if (param_1 < pbVar11) {\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }\n  else {\n    iVar10 = 0;\n  }" (if "if") (parenthesized_expression "(uVar3 < 2)" (( "(") (binary_expression "uVar3 < 2" (identifier "uVar3") (< "<") (number_literal "2")) () ")")) (compound_statement "{\n    iVar10 = 0;\n    if (param_1 < pbVar11) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }\n  }" ({ "{") (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" (identifier "iVar10") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_1 < pbVar11) {\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }" (if "if") (parenthesized_expression "(param_1 < pbVar11)" (( "(") (binary_expression "param_1 < pbVar11" (identifier "param_1") (< "<") (identifier "pbVar11")) () ")")) (compound_statement "{\n      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();\n      iVar10 = 0;\n      param_2 = (byte *)0x7fffffff;\n      do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);\n    }" ({ "{") (expression_statement "piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();" (assignment_expression "piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)()" (identifier "piVar4") (= "=") (cast_expression "(int *)(*(code *)PTR___ctype_b_loc_00037448)()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___ctype_b_loc_00037448)()" (parenthesized_expression "(*(code *)PTR___ctype_b_loc_00037448)" (( "(") (pointer_expression "*(code *)PTR___ctype_b_loc_00037448" (* "*") (cast_expression "(code *)PTR___ctype_b_loc_00037448" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___ctype_b_loc_00037448"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" (identifier "iVar10") (= "=") (number_literal "0")) (; ";")) (expression_statement "param_2 = (byte *)0x7fffffff;" (assignment_expression "param_2 = (byte *)0x7fffffff" (identifier "param_2") (= "=") (cast_expression "(byte *)0x7fffffff" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x7fffffff"))) (; ";")) (do_statement "do {\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      } while (pbVar11 != pbVar9);" (do "do") (compound_statement "{\n        pbVar9 = param_1 + 1;\n        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);\n        if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }\n        iVar10 = iVar5;\n        param_1 = pbVar9;\n      }" ({ "{") (expression_statement "pbVar9 = param_1 + 1;" (assignment_expression "pbVar9 = param_1 + 1" (identifier "pbVar9") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);" (assignment_expression "uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2)" (identifier "uVar2") (= "=") (pointer_expression "*(ushort *)(*piVar4 + (uint)*param_1 * 2)" (* "*") (cast_expression "(ushort *)(*piVar4 + (uint)*param_1 * 2)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar4 + (uint)*param_1 * 2)" (( "(") (binary_expression "*piVar4 + (uint)*param_1 * 2" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (binary_expression "(uint)*param_1 * 2" (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "param_1")) (* "*") (number_literal "2"))) () ")"))))) (; ";")) (if_statement "if ((uVar2 & 0x40) == 0) {\n          if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }\n        else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\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) {\n            iVar10 = -1;\n            break;\n          }\n          iVar5 = iVar10;\n          if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }\n        }" ({ "{") (if_statement "if ((param_3 & 2) != 0) {\n            iVar10 = -1;\n            break;\n          }" (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")) () ")")) (compound_statement "{\n            iVar10 = -1;\n            break;\n          }" ({ "{") (expression_statement "iVar10 = -1;" (assignment_expression "iVar10 = -1" (identifier "iVar10") (= "=") (number_literal "-1")) (; ";")) (break_statement "break;" (break "break") (; ";")) (} "}"))) (expression_statement "iVar5 = iVar10;" (assignment_expression "iVar5 = iVar10" (identifier "iVar5") (= "=") (identifier "iVar10")) (; ";")) (if_statement "if ((uVar2 & 0x200) == 0) {\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }" (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")) () ")")) (compound_statement "{\n            if (iVar10 == 0x7fffffff) break;\n            iVar5 = iVar10 + 1;\n          }" ({ "{") (if_statement "if (iVar10 == 0x7fffffff) break;" (if "if") (parenthesized_expression "(iVar10 == 0x7fffffff)" (( "(") (binary_expression "iVar10 == 0x7fffffff" (identifier "iVar10") (== "==") (number_literal "0x7fffffff")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar5 = iVar10 + 1;" (assignment_expression "iVar5 = iVar10 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar10 + 1" (identifier "iVar10") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }" (else "else") (compound_statement "{\n          iVar5 = iVar10 + 1;\n          if (iVar10 == 0x7fffffff) break;\n        }" ({ "{") (expression_statement "iVar5 = iVar10 + 1;" (assignment_expression "iVar5 = iVar10 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar10 + 1" (identifier "iVar10") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (iVar10 == 0x7fffffff) break;" (if "if") (parenthesized_expression "(iVar10 == 0x7fffffff)" (( "(") (binary_expression "iVar10 == 0x7fffffff" (identifier "iVar10") (== "==") (number_literal "0x7fffffff")) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}")))) (expression_statement "iVar10 = iVar5;" (assignment_expression "iVar10 = iVar5" (identifier "iVar10") (= "=") (identifier "iVar5")) (; ";")) (expression_statement "param_1 = pbVar9;" (assignment_expression "param_1 = pbVar9" (identifier "param_1") (= "=") (identifier "pbVar9")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pbVar11 != pbVar9)" (( "(") (binary_expression "pbVar11 != pbVar9" (identifier "pbVar11") (!= "!=") (identifier "pbVar9")) () ")")) (; ";")) (} "}"))) (} "}")) (else_clause "else if (param_1 < pbVar11) {\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }\n  else {\n    iVar10 = 0;\n  }" (else "else") (if_statement "if (param_1 < pbVar11) {\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }\n  else {\n    iVar10 = 0;\n  }" (if "if") (parenthesized_expression "(param_1 < pbVar11)" (( "(") (binary_expression "param_1 < pbVar11" (identifier "param_1") (< "<") (identifier "pbVar11")) () ")")) (compound_statement "{\n    iVar10 = 0;\n    do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);\n  }" ({ "{") (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" (identifier "iVar10") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    } while (param_1 < pbVar11);" (do "do") (compound_statement "{\n      iVar5 = (int)(char)*param_1;\n      if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }\n    }" ({ "{") (expression_statement "iVar5 = (int)(char)*param_1;" (assignment_expression "iVar5 = (int)(char)*param_1" (identifier "iVar5") (= "=") (cast_expression "(int)(char)*param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(char)*param_1" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1"))))) (; ";")) (if_statement "if (iVar5 < 0x40) {\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }\n      else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }" (if "if") (parenthesized_expression "(iVar5 < 0x40)" (( "(") (binary_expression "iVar5 < 0x40" (identifier "iVar5") (< "<") (number_literal "0x40")) () ")")) (compound_statement "{\n        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;\nLAB_0001aef8:\n        local_34 = 0;\n        local_30 = 0;\n        do {\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);\n      }" ({ "{") (if_statement "if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;" (if "if") (parenthesized_expression "((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4))" (( "(") (binary_expression "(0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)" (parenthesized_expression "(0x24 < iVar5)" (( "(") (binary_expression "0x24 < iVar5" (number_literal "0x24") (< "<") (identifier "iVar5")) () ")")) (|| "||") (parenthesized_expression "((iVar5 - 0x20U & 0xff) < 4)" (( "(") (binary_expression "(iVar5 - 0x20U & 0xff) < 4" (parenthesized_expression "(iVar5 - 0x20U & 0xff)" (( "(") (binary_expression "iVar5 - 0x20U & 0xff" (binary_expression "iVar5 - 0x20U" (identifier "iVar5") (- "-") (number_literal "0x20U")) (& "&") (number_literal "0xff")) () ")")) (< "<") (number_literal "4")) () ")"))) () ")")) (goto_statement "goto LAB_0001aeb8;" (goto "goto") (statement_identifier "LAB_0001aeb8") (; ";"))) (labeled_statement "LAB_0001aef8:\n        local_34 = 0;" (statement_identifier "LAB_0001aef8") (: ":") (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          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        } while (iVar6 == 0);" (do "do") (compound_statement "{\n          param_2 = param_1;\n          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);\n          if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }\n          if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }\n          if (iVar5 == 0) {\n            iVar5 = 1;\n          }\n          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);\n          iVar8 = 0x7fffffff - iVar10;\n          if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }\n          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);\n          param_1 = param_1 + iVar5;\n        }" ({ "{") (expression_statement "param_2 = param_1;" (assignment_expression "param_2 = param_1" (identifier "param_2") (= "=") (identifier "param_1")) (; ";")) (expression_statement "iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);" (assignment_expression "iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34)" (identifier "iVar5") (= "=") (call_expression "rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34)" (identifier "rpl_mbrtowc") (argument_list "(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34)" (( "(") (pointer_expression "&local_38" (& "&") (identifier "local_38")) (, ",") (identifier "param_1") (, ",") (binary_expression "(int)pbVar11 - (int)param_1" (cast_expression "(int)pbVar11" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar11")) (- "-") (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1"))) (, ",") (pointer_expression "&local_34" (& "&") (identifier "local_34")) () ")")))) (; ";")) (if_statement "if (iVar5 == -1) {\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\n          }" (if "if") (parenthesized_expression "(iVar5 == -1)" (( "(") (binary_expression "iVar5 == -1" (identifier "iVar5") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n            param_1 = param_1 + 1;\n            if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }\n            iVar10 = iVar10 + 1;\n            break;\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"))) (; ";")) (if_statement "if ((param_3 & 1) != 0) {\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }" (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")) () ")")) (compound_statement "{\nLAB_0001afe8:\n              iVar10 = -1;\n              goto LAB_0001affc;\n            }" ({ "{") (labeled_statement "LAB_0001afe8:\n              iVar10 = -1;" (statement_identifier "LAB_0001afe8") (: ":") (expression_statement "iVar10 = -1;" (assignment_expression "iVar10 = -1" (identifier "iVar10") (= "=") (number_literal "-1")) (; ";"))) (goto_statement "goto LAB_0001affc;" (goto "goto") (statement_identifier "LAB_0001affc") (; ";")) (} "}"))) (expression_statement "iVar10 = iVar10 + 1;" (assignment_expression "iVar10 = iVar10 + 1" (identifier "iVar10") (= "=") (binary_expression "iVar10 + 1" (identifier "iVar10") (+ "+") (number_literal "1"))) (; ";")) (break_statement "break;" (break "break") (; ";")) (} "}"))) (if_statement "if (iVar5 == -2) {\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }" (if "if") (parenthesized_expression "(iVar5 == -2)" (( "(") (binary_expression "iVar5 == -2" (identifier "iVar5") (== "==") (number_literal "-2")) () ")")) (compound_statement "{\n            if ((param_3 & 1) != 0) goto LAB_0001afe8;\n            iVar10 = iVar10 + 1;\n            param_1 = pbVar11;\n            break;\n          }" ({ "{") (if_statement "if ((param_3 & 1) != 0) goto LAB_0001afe8;" (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_0001afe8;" (goto "goto") (statement_identifier "LAB_0001afe8") (; ";"))) (expression_statement "iVar10 = iVar10 + 1;" (assignment_expression "iVar10 = iVar10 + 1" (identifier "iVar10") (= "=") (binary_expression "iVar10 + 1" (identifier "iVar10") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "param_1 = pbVar11;" (assignment_expression "param_1 = pbVar11" (identifier "param_1") (= "=") (identifier "pbVar11")) (; ";")) (break_statement "break;" (break "break") (; ";")) (} "}"))) (if_statement "if (iVar5 == 0) {\n            iVar5 = 1;\n          }" (if "if") (parenthesized_expression "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n            iVar5 = 1;\n          }" ({ "{") (expression_statement "iVar5 = 1;" (assignment_expression "iVar5 = 1" (identifier "iVar5") (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);" (assignment_expression "iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38)" (identifier "iVar6") (= "=") (call_expression "(*(code *)PTR_wcwidth_000375a0)(local_38)" (parenthesized_expression "(*(code *)PTR_wcwidth_000375a0)" (( "(") (pointer_expression "*(code *)PTR_wcwidth_000375a0" (* "*") (cast_expression "(code *)PTR_wcwidth_000375a0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_wcwidth_000375a0"))) () ")")) (argument_list "(local_38)" (( "(") (identifier "local_38") () ")")))) (; ";")) (expression_statement "iVar8 = 0x7fffffff - iVar10;" (assignment_expression "iVar8 = 0x7fffffff - iVar10" (identifier "iVar8") (= "=") (binary_expression "0x7fffffff - iVar10" (number_literal "0x7fffffff") (- "-") (identifier "iVar10"))) (; ";")) (if_statement "if (iVar6 < 0) {\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }\n          else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }" (if "if") (parenthesized_expression "(iVar6 < 0)" (( "(") (binary_expression "iVar6 < 0" (identifier "iVar6") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n            if ((param_3 & 2) != 0) goto LAB_0001afe8;\n            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);\n            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;\n          }" ({ "{") (if_statement "if ((param_3 & 2) != 0) goto LAB_0001afe8;" (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_0001afe8;" (goto "goto") (statement_identifier "LAB_0001afe8") (; ";"))) (expression_statement "iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);" (assignment_expression "iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38)" (identifier "iVar6") (= "=") (call_expression "(*(code *)PTR_iswcntrl_00037568)(local_38)" (parenthesized_expression "(*(code *)PTR_iswcntrl_00037568)" (( "(") (pointer_expression "*(code *)PTR_iswcntrl_00037568" (* "*") (cast_expression "(code *)PTR_iswcntrl_00037568" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_iswcntrl_00037568"))) () ")")) (argument_list "(local_38)" (( "(") (identifier "local_38") () ")")))) (; ";")) (if_statement "if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))\n            goto LAB_0001aff0;" (if "if") (parenthesized_expression "((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))" (( "(") (binary_expression "(iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1)" (parenthesized_expression "(iVar6 == 0)" (( "(") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1)" (( "(") (comma_expression "bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1" (assignment_expression "bVar1 = iVar10 == 0x7fffffff" (identifier "bVar1") (= "=") (binary_expression "iVar10 == 0x7fffffff" (identifier "iVar10") (== "==") (number_literal "0x7fffffff"))) (, ",") (comma_expression "iVar10 = iVar10 + 1, bVar1" (assignment_expression "iVar10 = iVar10 + 1" (identifier "iVar10") (= "=") (binary_expression "iVar10 + 1" (identifier "iVar10") (+ "+") (number_literal "1"))) (, ",") (identifier "bVar1"))) () ")"))) () ")")) (goto_statement "goto LAB_0001aff0;" (goto "goto") (statement_identifier "LAB_0001aff0") (; ";"))) (} "}")) (else_clause "else {\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }" (else "else") (compound_statement "{\n            iVar10 = iVar10 + iVar6;\n            if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }\n          }" ({ "{") (expression_statement "iVar10 = iVar10 + iVar6;" (assignment_expression "iVar10 = iVar10 + iVar6" (identifier "iVar10") (= "=") (binary_expression "iVar10 + iVar6" (identifier "iVar10") (+ "+") (identifier "iVar6"))) (; ";")) (if_statement "if (iVar8 < iVar6) {\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }" (if "if") (parenthesized_expression "(iVar8 < iVar6)" (( "(") (binary_expression "iVar8 < iVar6" (identifier "iVar8") (< "<") (identifier "iVar6")) () ")")) (compound_statement "{\nLAB_0001aff0:\n              iVar10 = 0x7fffffff;\n              goto LAB_0001affc;\n            }" ({ "{") (labeled_statement "LAB_0001aff0:\n              iVar10 = 0x7fffffff;" (statement_identifier "LAB_0001aff0") (: ":") (expression_statement "iVar10 = 0x7fffffff;" (assignment_expression "iVar10 = 0x7fffffff" (identifier "iVar10") (= "=") (number_literal "0x7fffffff")) (; ";"))) (goto_statement "goto LAB_0001affc;" (goto "goto") (statement_identifier "LAB_0001affc") (; ";")) (} "}"))) (} "}")))) (expression_statement "iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);" (assignment_expression "iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34)" (identifier "iVar6") (= "=") (call_expression "(*(code *)PTR_mbsinit_00037588)(&local_34)" (parenthesized_expression "(*(code *)PTR_mbsinit_00037588)" (( "(") (pointer_expression "*(code *)PTR_mbsinit_00037588" (* "*") (cast_expression "(code *)PTR_mbsinit_00037588" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_mbsinit_00037588"))) () ")")) (argument_list "(&local_34)" (( "(") (pointer_expression "&local_34" (& "&") (identifier "local_34")) () ")")))) (; ";")) (expression_statement "param_1 = param_1 + iVar5;" (assignment_expression "param_1 = param_1 + iVar5" (identifier "param_1") (= "=") (binary_expression "param_1 + iVar5" (identifier "param_1") (+ "+") (identifier "iVar5"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar6 == 0)" (( "(") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0")) () ")")) (; ";")) (} "}")) (else_clause "else {\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }" (else "else") (compound_statement "{\n        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;\nLAB_0001aeb8:\n        param_1 = param_1 + 1;\n        iVar10 = iVar10 + 1;\n      }" ({ "{") (if_statement "if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))\n        goto LAB_0001aef8;" (if "if") (parenthesized_expression "((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))" (( "(") (binary_expression "(iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff))))" (parenthesized_expression "(iVar5 < 0x41)" (( "(") (binary_expression "iVar5 < 0x41" (identifier "iVar5") (< "<") (number_literal "0x41")) () ")")) (|| "||") (parenthesized_expression "((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff))))" (( "(") (parenthesized_expression "(0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))" (( "(") (binary_expression "0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff))" (binary_expression "0x5f < iVar5" (number_literal "0x5f") (< "<") (identifier "iVar5")) (&& "&&") (parenthesized_expression "(0x1d < (iVar5 - 0x61U & 0xff))" (( "(") (binary_expression "0x1d < (iVar5 - 0x61U & 0xff)" (number_literal "0x1d") (< "<") (parenthesized_expression "(iVar5 - 0x61U & 0xff)" (( "(") (binary_expression "iVar5 - 0x61U & 0xff" (binary_expression "iVar5 - 0x61U" (identifier "iVar5") (- "-") (number_literal "0x61U")) (& "&") (number_literal "0xff")) () ")"))) () ")"))) () ")")) () ")"))) () ")")) (goto_statement "goto LAB_0001aef8;" (goto "goto") (statement_identifier "LAB_0001aef8") (; ";"))) (labeled_statement "LAB_0001aeb8:\n        param_1 = param_1 + 1;" (statement_identifier "LAB_0001aeb8") (: ":") (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 "iVar10 = iVar10 + 1;" (assignment_expression "iVar10 = iVar10 + 1" (identifier "iVar10") (= "=") (binary_expression "iVar10 + 1" (identifier "iVar10") (+ "+") (number_literal "1"))) (; ";")) (} "}")))) (} "}")) (while "while") (parenthesized_expression "(param_1 < pbVar11)" (( "(") (binary_expression "param_1 < pbVar11" (identifier "param_1") (< "<") (identifier "pbVar11")) () ")")) (; ";")) (} "}")) (else_clause "else {\n    iVar10 = 0;\n  }" (else "else") (compound_statement "{\n    iVar10 = 0;\n  }" ({ "{") (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" (identifier "iVar10") (= "=") (number_literal "0")) (; ";")) (} "}")))))) (labeled_statement "LAB_0001affc:\n  if (local_2c != *(int *)PTR___stack_chk_guard_0003758c) {\n    iVar10 = local_2c;\n    puVar12 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    uVar7 = (**(code **)(puVar12 + 0x1c448))();\n    iVar10 = mbsnwidth(iVar10,uVar7,param_2);\n    return iVar10;\n  }" (statement_identifier "LAB_0001affc") (: ":") (if_statement "if (local_2c != *(int *)PTR___stack_chk_guard_0003758c) {\n    iVar10 = local_2c;\n    puVar12 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    uVar7 = (**(code **)(puVar12 + 0x1c448))();\n    iVar10 = mbsnwidth(iVar10,uVar7,param_2);\n    return iVar10;\n  }" (if "if") (parenthesized_expression "(local_2c != *(int *)PTR___stack_chk_guard_0003758c)" (( "(") (binary_expression "local_2c != *(int *)PTR___stack_chk_guard_0003758c" (identifier "local_2c") (!= "!=") (pointer_expression "*(int *)PTR___stack_chk_guard_0003758c" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_0003758c" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_0003758c")))) () ")")) (compound_statement "{\n    iVar10 = local_2c;\n    puVar12 = PTR___stack_chk_fail_0003756c;\n    (*(code *)PTR___stack_chk_fail_0003756c)();\n    uVar7 = (**(code **)(puVar12 + 0x1c448))();\n    iVar10 = mbsnwidth(iVar10,uVar7,param_2);\n    return iVar10;\n  }" ({ "{") (expression_statement "iVar10 = local_2c;" (assignment_expression "iVar10 = local_2c" (identifier "iVar10") (= "=") (identifier "local_2c")) (; ";")) (expression_statement "puVar12 = PTR___stack_chk_fail_0003756c;" (assignment_expression "puVar12 = PTR___stack_chk_fail_0003756c" (identifier "puVar12") (= "=") (identifier "PTR___stack_chk_fail_0003756c")) (; ";")) (expression_statement "(*(code *)PTR___stack_chk_fail_0003756c)();" (call_expression "(*(code *)PTR___stack_chk_fail_0003756c)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_0003756c)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_0003756c" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_0003756c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_0003756c"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "uVar7 = (**(code **)(puVar12 + 0x1c448))();" (assignment_expression "uVar7 = (**(code **)(puVar12 + 0x1c448))()" (identifier "uVar7") (= "=") (call_expression "(**(code **)(puVar12 + 0x1c448))()" (parenthesized_expression "(**(code **)(puVar12 + 0x1c448))" (( "(") (pointer_expression "**(code **)(puVar12 + 0x1c448)" (* "*") (pointer_expression "*(code **)(puVar12 + 0x1c448)" (* "*") (cast_expression "(code **)(puVar12 + 0x1c448)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar12 + 0x1c448)" (( "(") (binary_expression "puVar12 + 0x1c448" (identifier "puVar12") (+ "+") (number_literal "0x1c448")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar10 = mbsnwidth(iVar10,uVar7,param_2);" (assignment_expression "iVar10 = mbsnwidth(iVar10,uVar7,param_2)" (identifier "iVar10") (= "=") (call_expression "mbsnwidth(iVar10,uVar7,param_2)" (identifier "mbsnwidth") (argument_list "(iVar10,uVar7,param_2)" (( "(") (identifier "iVar10") (, ",") (identifier "uVar7") (, ",") (identifier "param_2") () ")")))) (; ";")) (return_statement "return iVar10;" (return "return") (identifier "iVar10") (; ";")) (} "}")))) (return_statement "return iVar10;" (return "return") (identifier "iVar10") (; ";")) (} "}")))

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

{
  bool bVar1;
  type_1 var_5;
  char *var_13;
  type_2 var_3;
  int *piVar4;
  int var_9;
  size_t var_11;
  int var_12;
  type_3 *var_8;
  int var_7;
  type_3 *var_4;
  type_4 *var_14;
  type_5 wc;
  type_6 mbstate;
  
  var_13 = *(char **)PTR___stack_chk_guard_0003758c;
  var_4 = (type_3 *)(var_1 + var_2);
  var_3 = (*(type_7 *)PTR___ctype_get_mb_cur_max_00037544)();
  if (var_3 < 2) {
    var_7 = 0;
    if (var_1 < var_4) {
      piVar4 = (int *)(*(type_7 *)PTR___ctype_b_loc_00037448)();
      var_7 = 0;
      var_2 = 0x7fffffff;
      do {
        var_8 = (type_3 *)var_1 + 1;
        var_5 = *(type_1 *)(*piVar4 + (type_2)(type_3)*var_1 * 2);
        if ((var_5 & 0x40) == 0) {
          if ((var_6 & 2U) != 0) {
            var_7 = -1;
            break;
          }
          var_9 = var_7;
          if ((var_5 & 0x200) == 0) {
            if (var_7 == 0x7fffffff) break;
            var_9 = var_7 + 1;
          }
        }
        else {
          var_9 = var_7 + 1;
          if (var_7 == 0x7fffffff) break;
        }
        var_7 = var_9;
        var_1 = (char *)var_8;
      } while (var_4 != var_8);
    }
  }
  else if (var_1 < var_4) {
    var_7 = 0;
    do {
      var_9 = (int)*var_1;
      if (var_9 < 0x40) {
        if ((0x24 < var_9) || ((var_9 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;
LAB_0001aef8:
        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) {
            var_1 = (char *)((type_3 *)var_1 + 1);
            if ((var_6 & 1U) != 0) {
LAB_0001afe8:
              var_7 = -1;
              goto LAB_0001affc;
            }
            var_7 = var_7 + 1;
            break;
          }
          if (var_11 == 0xfffffffe) {
            if ((var_6 & 1U) != 0) goto LAB_0001afe8;
            var_7 = var_7 + 1;
            var_1 = (char *)var_4;
            break;
          }
          if (var_11 == 0) {
            var_11 = 1;
          }
          var_9 = (*(type_7 *)PTR_wcwidth_000375a0)(wc);
          var_12 = 0x7fffffff - var_7;
          if (var_9 < 0) {
            if ((var_6 & 2U) != 0) goto LAB_0001afe8;
            var_9 = (*(type_7 *)PTR_iswcntrl_00037568)(wc);
            if ((var_9 == 0) && (bVar1 = var_7 == 0x7fffffff, var_7 = var_7 + 1, bVar1))
            goto LAB_0001aff0;
          }
          else {
            var_7 = var_7 + var_9;
            if (var_12 < var_9) {
LAB_0001aff0:
              var_7 = 0x7fffffff;
              goto LAB_0001affc;
            }
          }
          var_9 = (*(type_7 *)PTR_mbsinit_00037588)(&mbstate);
          var_1 = (char *)((type_3 *)var_1 + var_11);
        } while (var_9 == 0);
      }
      else {
        if ((var_9 < 0x41) || ((0x5f < var_9 && (0x1d < (var_9 - 0x61U & 0xff)))))
        goto LAB_0001aef8;
LAB_0001aeb8:
        var_1 = (char *)((type_3 *)var_1 + 1);
        var_7 = var_7 + 1;
      }
    } while (var_1 < var_4);
  }
  else {
    var_7 = 0;
  }
LAB_0001affc:
  if (var_13 != *(char **)PTR___stack_chk_guard_0003758c) {
    var_14 = PTR___stack_chk_fail_0003756c;
    (*(type_7 *)PTR___stack_chk_fail_0003756c)();
    var_11 = (**(type_7 **)(var_14 + 0x1c448))();
    var_7 = function_1(var_13,var_11,var_2);
    return var_7;
  }
  return var_7;
}


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

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

{
  bool bVar1;
  ushort uVar2;
  uint uVar3;
  int *piVar4;
  int iVar5;
  int iVar6;
  undefined4 uVar7;
  int iVar8;
  byte *pbVar9;
  int iVar10;
  byte *pbVar11;
  undefined *puVar12;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  int local_2c;
  
  local_2c = *(int *)PTR___stack_chk_guard_0003758c;
  pbVar11 = param_1 + (int)param_2;
  uVar3 = (*(code *)PTR___ctype_get_mb_cur_max_00037544)();
  if (uVar3 < 2) {
    iVar10 = 0;
    if (param_1 < pbVar11) {
      piVar4 = (int *)(*(code *)PTR___ctype_b_loc_00037448)();
      iVar10 = 0;
      param_2 = (byte *)0x7fffffff;
      do {
        pbVar9 = param_1 + 1;
        uVar2 = *(ushort *)(*piVar4 + (uint)*param_1 * 2);
        if ((uVar2 & 0x40) == 0) {
          if ((param_3 & 2) != 0) {
            iVar10 = -1;
            break;
          }
          iVar5 = iVar10;
          if ((uVar2 & 0x200) == 0) {
            if (iVar10 == 0x7fffffff) break;
            iVar5 = iVar10 + 1;
          }
        }
        else {
          iVar5 = iVar10 + 1;
          if (iVar10 == 0x7fffffff) break;
        }
        iVar10 = iVar5;
        param_1 = pbVar9;
      } while (pbVar11 != pbVar9);
    }
  }
  else if (param_1 < pbVar11) {
    iVar10 = 0;
    do {
      iVar5 = (int)(char)*param_1;
      if (iVar5 < 0x40) {
        if ((0x24 < iVar5) || ((iVar5 - 0x20U & 0xff) < 4)) goto LAB_0001aeb8;
LAB_0001aef8:
        local_34 = 0;
        local_30 = 0;
        do {
          param_2 = param_1;
          iVar5 = rpl_mbrtowc(&local_38,param_1,(int)pbVar11 - (int)param_1,&local_34);
          if (iVar5 == -1) {
            param_1 = param_1 + 1;
            if ((param_3 & 1) != 0) {
LAB_0001afe8:
              iVar10 = -1;
              goto LAB_0001affc;
            }
            iVar10 = iVar10 + 1;
            break;
          }
          if (iVar5 == -2) {
            if ((param_3 & 1) != 0) goto LAB_0001afe8;
            iVar10 = iVar10 + 1;
            param_1 = pbVar11;
            break;
          }
          if (iVar5 == 0) {
            iVar5 = 1;
          }
          iVar6 = (*(code *)PTR_wcwidth_000375a0)(local_38);
          iVar8 = 0x7fffffff - iVar10;
          if (iVar6 < 0) {
            if ((param_3 & 2) != 0) goto LAB_0001afe8;
            iVar6 = (*(code *)PTR_iswcntrl_00037568)(local_38);
            if ((iVar6 == 0) && (bVar1 = iVar10 == 0x7fffffff, iVar10 = iVar10 + 1, bVar1))
            goto LAB_0001aff0;
          }
          else {
            iVar10 = iVar10 + iVar6;
            if (iVar8 < iVar6) {
LAB_0001aff0:
              iVar10 = 0x7fffffff;
              goto LAB_0001affc;
            }
          }
          iVar6 = (*(code *)PTR_mbsinit_00037588)(&local_34);
          param_1 = param_1 + iVar5;
        } while (iVar6 == 0);
      }
      else {
        if ((iVar5 < 0x41) || ((0x5f < iVar5 && (0x1d < (iVar5 - 0x61U & 0xff)))))
        goto LAB_0001aef8;
LAB_0001aeb8:
        param_1 = param_1 + 1;
        iVar10 = iVar10 + 1;
      }
    } while (param_1 < pbVar11);
  }
  else {
    iVar10 = 0;
  }
LAB_0001affc:
  if (local_2c != *(int *)PTR___stack_chk_guard_0003758c) {
    iVar10 = local_2c;
    puVar12 = PTR___stack_chk_fail_0003756c;
    (*(code *)PTR___stack_chk_fail_0003756c)();
    uVar7 = (**(code **)(puVar12 + 0x1c448))();
    iVar10 = MASKED(iVar10,uVar7,param_2);
    return iVar10;
  }
  return iVar10;
}

