
ptrdiff_t mb_goback(char **mb_start,char *cur,char *end)

{
  undefined *puVar1;
  undefined *puVar2;
  ptrdiff_t pVar3;
  uint uVar4;
  byte *s;
  int iVar5;
  size_t sVar6;
  byte *pbVar7;
  byte *s_00;
  mbstate_t mbs;
  
  puVar2 = PTR___stack_chk_guard_000564b4;
  puVar1 = PTR_localeinfo_00056174;
  pbVar7 = (byte *)*mb_start;
  iVar5 = *(int *)PTR___stack_chk_guard_000564b4;
  pVar3 = (int)cur - (int)pbVar7;
  if (cur <= pbVar7) goto LAB_000219c0;
  if (PTR_localeinfo_00056174[1] == '\0') {
    mbs.__count = 0;
    mbs.__value.__wch = 0;
    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];
    s = pbVar7;
    if (uVar4 == 0xfffffffe) goto LAB_00021980;
LAB_00021950:
    if (0xfffffffd < uVar4) goto LAB_000219a0;
    while (s = pbVar7 + uVar4, s < cur) {
      while( true ) {
        uVar4 = (uint)(char)puVar1[*s + 2];
        pbVar7 = s;
        if (uVar4 != 0xfffffffe) goto LAB_00021950;
LAB_00021980:
        uVar4 = rpl_mbrlen((char *)s,(int)end - (int)s,&mbs);
        pbVar7 = s;
        if (uVar4 < 0xfffffffe) break;
LAB_000219a0:
        s = pbVar7 + 1;
        mbs.__count = 0;
        mbs.__value.__wch = 0;
        if (cur <= s) goto LAB_000219b4;
      }
    }
  }
  else {
    if ((end <= cur) || (((int)*cur & 0xc0U) != 0x80)) {
LAB_00021a4c:
      pVar3 = 0;
      *mb_start = cur;
      goto LAB_000219c0;
    }
    uVar4 = 1;
    if (((int)cur[-1] & 0xc0U) == 0x80) {
      if (((int)cur[-2] & 0xc0U) == 0x80) {
        uVar4 = 3;
        if (((int)cur[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;
      }
      else {
        uVar4 = 2;
      }
    }
    s_00 = (byte *)(cur + -uVar4);
    mbs.__count = 0;
    mbs.__value.__wch = 0;
    sVar6 = (size_t)(char)PTR_localeinfo_00056174[*s_00 + 2];
    if (sVar6 == 0xfffffffe) {
      sVar6 = rpl_mbrlen((char *)s_00,(int)end - (int)s_00,&mbs);
    }
    s = (byte *)cur;
    if ((uVar4 < sVar6) && (sVar6 < 0xfffffffe)) {
      s = s_00 + sVar6;
      pbVar7 = s_00;
    }
  }
LAB_000219b4:
  *mb_start = (char *)s;
  if (s == (byte *)cur) goto LAB_00021ad0;
  pVar3 = (int)cur - (int)pbVar7;
LAB_000219c0:
  while (iVar5 != *(int *)puVar2) {
    (*(code *)PTR___stack_chk_fail_00056494)();
LAB_00021ad0:
    pVar3 = 0;
  }
  return pVar3;
}



int mb_goback(undefined4 *param_1,byte *param_2,byte *param_3)

{
  undefined *puVar1;
  undefined *puVar2;
  int iVar3;
  uint uVar4;
  byte *pbVar5;
  uint uVar6;
  byte *pbVar7;
  byte *pbVar8;
  undefined4 local_34;
  undefined4 local_30;
  int local_2c;
  
  puVar2 = PTR___stack_chk_guard_000564b4;
  puVar1 = PTR_localeinfo_00056174;
  pbVar7 = (byte *)*param_1;
  local_2c = *(int *)PTR___stack_chk_guard_000564b4;
  iVar3 = (int)param_2 - (int)pbVar7;
  if (param_2 <= pbVar7) goto LAB_000219c0;
  if (PTR_localeinfo_00056174[1] == '\0') {
    local_34 = 0;
    local_30 = 0;
    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];
    pbVar5 = pbVar7;
    if (uVar4 == 0xfffffffe) goto LAB_00021980;
LAB_00021950:
    if (0xfffffffd < uVar4) goto LAB_000219a0;
    while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {
      while( true ) {
        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];
        pbVar7 = pbVar5;
        if (uVar4 != 0xfffffffe) goto LAB_00021950;
LAB_00021980:
        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);
        pbVar7 = pbVar5;
        if (uVar4 < 0xfffffffe) break;
LAB_000219a0:
        pbVar5 = pbVar7 + 1;
        local_34 = 0;
        local_30 = 0;
        if (param_2 <= pbVar5) goto LAB_000219b4;
      }
    }
  }
  else {
    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {
LAB_00021a4c:
      iVar3 = 0;
      *param_1 = param_2;
      goto LAB_000219c0;
    }
    uVar4 = 1;
    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {
      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {
        uVar4 = 3;
        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;
      }
      else {
        uVar4 = 2;
      }
    }
    pbVar8 = param_2 + -uVar4;
    local_34 = 0;
    local_30 = 0;
    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];
    if (uVar6 == 0xfffffffe) {
      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);
    }
    pbVar5 = param_2;
    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {
      pbVar5 = pbVar8 + uVar6;
      pbVar7 = pbVar8;
    }
  }
LAB_000219b4:
  *param_1 = pbVar5;
  if (pbVar5 == param_2) goto LAB_00021ad0;
  iVar3 = (int)param_2 - (int)pbVar7;
LAB_000219c0:
  while (local_2c != *(int *)puVar2) {
    (*(code *)PTR___stack_chk_fail_00056494)();
LAB_00021ad0:
    iVar3 = 0;
  }
  return iVar3;
}


lui gp,0x4
addiu gp,gp,-0x37e0
addu gp,gp,t9
addiu sp,sp,-0x50
sw s4,0x3c(sp)
sw s0,0x2c(sp)
lw s4,-0x7c2c(gp)
lw s0,0x0(a0)
sw gp,0x10(sp)
sw s1,0x30(sp)
or s1,a1,zero
sw ra,0x4c(sp)
sltu v0,s0,a1
sw s7,0x48(sp)
sw s6,0x44(sp)
sw s5,0x40(sp)
sw s3,0x38(sp)
sw s2,0x34(sp)
lw v1,0x0(s4)
sw v1,0x24(sp)
beq v0,zero,0x000219c0
_subu v0,s1,s0
lw s2,-0x7f6c(gp)
or s6,a0,zero
lbu v0,0x1(s2)
bne v0,zero,0x000219f8
_or s7,a2,zero
sw zero,0x1c(sp)
li s3,-0x2
sw zero,0x20(sp)
lbu v0,0x0(s0)
addu v0,s2,v0
lb v0,0x2(v0)
beq v0,s3,0x00021980
_addiu s5,sp,0x1c
sltiu v1,v0,-0x2
beq v1,zero,0x000219a0
_nop
addu v0,s0,v0
sltu v1,v0,s1
beq v1,zero,0x000219b4
_nop
or s0,v0,zero
lbu v0,0x0(s0)
addu v0,s2,v0
lb v0,0x2(v0)
bne v0,s3,0x00021950
_sltiu v1,v0,-0x2
lw t9,-0x7fa4(gp)
subu a1,s7,s0
or a2,s5,zero
bal 0x0003d5a0
_or a0,s0,zero
sltiu v1,v0,-0x2
bne v1,zero,0x00021958
_lw gp,0x10(sp)
addiu v0,s0,0x1
sw zero,0x0(s5)
sltu v1,v0,s1
bne v1,zero,0x00021968
_sw zero,0x4(s5)
beq v0,s1,0x00021ad0
_sw v0,0x0(s6)
subu v0,s1,s0
lw a0,0x24(sp)
lw v1,0x0(s4)
bne a0,v1,0x00021ac4
_lw ra,0x4c(sp)
lw s7,0x48(sp)
lw s6,0x44(sp)
lw s5,0x40(sp)
lw s4,0x3c(sp)
lw s3,0x38(sp)
lw s2,0x34(sp)
lw s1,0x30(sp)
lw s0,0x2c(sp)
jr ra
_addiu sp,sp,0x50
sltu v0,a1,a2
beq v0,zero,0x00021a4c
_or v0,zero,zero
lb v0,0x0(a1)
li v1,0x80
andi v0,v0,0xc0
bne v0,v1,0x00021a48
_nop
lb v1,-0x1(a1)
andi v1,v1,0xc0
bne v1,v0,0x00021a58
_li s3,0x1
lb v0,-0x2(a1)
andi v0,v0,0xc0
bne v0,v1,0x00021a54
_nop
lb v1,-0x3(a1)
andi v1,v1,0xc0
bne v1,v0,0x00021a58
_li s3,0x3
or v0,zero,zero
b 0x000219c0
_sw s1,0x0(s6)
li s3,0x2
subu s5,s1,s3
sw zero,0x1c(sp)
li a0,-0x2
sw zero,0x20(sp)
lbu v0,0x0(s5)
addu s2,s2,v0
lb v1,0x2(s2)
beq v1,a0,0x00021aa8
_lw t9,-0x7fa4(gp)
sltu s3,s3,v1
beq s3,zero,0x000219b4
_or v0,s1,zero
sltiu v0,v1,-0x2
beq v0,zero,0x00021aa0
_nop
addu v0,s5,v1
b 0x000219b4
_or s0,s5,zero
b 0x000219b4
_or v0,s1,zero
addiu a2,sp,0x1c
subu a1,s7,s5
bal 0x0003d5a0
_or a0,s5,zero
lw gp,0x10(sp)
b 0x00021a7c
_or v1,v0,zero
lw t9,-0x7c4c(gp)
jalr t9
_nop
b 0x000219c0
_or v0,zero,zero
(translation_unit "int mb_goback(undefined4 *param_1,byte *param_2,byte *param_3)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar2 = PTR___stack_chk_guard_000564b4;\n  puVar1 = PTR_localeinfo_00056174;\n  pbVar7 = (byte *)*param_1;\n  local_2c = *(int *)PTR___stack_chk_guard_000564b4;\n  iVar3 = (int)param_2 - (int)pbVar7;\n  if (param_2 <= pbVar7) goto LAB_000219c0;\n  if (PTR_localeinfo_00056174[1] == '\0') {\n    local_34 = 0;\n    local_30 = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    pbVar5 = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }\n  }\n  else {\n    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    pbVar8 = param_2 + -uVar4;\n    local_34 = 0;\n    local_30 = 0;\n    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];\n    if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }\n    pbVar5 = param_2;\n    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }\n  }\nLAB_000219b4:\n  *param_1 = pbVar5;\n  if (pbVar5 == param_2) goto LAB_00021ad0;\n  iVar3 = (int)param_2 - (int)pbVar7;\nLAB_000219c0:\n  while (local_2c != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    iVar3 = 0;\n  }\n  return iVar3;\n}\n\n" (function_definition "int mb_goback(undefined4 *param_1,byte *param_2,byte *param_3)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar2 = PTR___stack_chk_guard_000564b4;\n  puVar1 = PTR_localeinfo_00056174;\n  pbVar7 = (byte *)*param_1;\n  local_2c = *(int *)PTR___stack_chk_guard_000564b4;\n  iVar3 = (int)param_2 - (int)pbVar7;\n  if (param_2 <= pbVar7) goto LAB_000219c0;\n  if (PTR_localeinfo_00056174[1] == '\0') {\n    local_34 = 0;\n    local_30 = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    pbVar5 = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }\n  }\n  else {\n    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    pbVar8 = param_2 + -uVar4;\n    local_34 = 0;\n    local_30 = 0;\n    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];\n    if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }\n    pbVar5 = param_2;\n    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }\n  }\nLAB_000219b4:\n  *param_1 = pbVar5;\n  if (pbVar5 == param_2) goto LAB_00021ad0;\n  iVar3 = (int)param_2 - (int)pbVar7;\nLAB_000219c0:\n  while (local_2c != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    iVar3 = 0;\n  }\n  return iVar3;\n}" primitive_type (function_declarator "mb_goback(undefined4 *param_1,byte *param_2,byte *param_3)" identifier (parameter_list "(undefined4 *param_1,byte *param_2,byte *param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "byte *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar2 = PTR___stack_chk_guard_000564b4;\n  puVar1 = PTR_localeinfo_00056174;\n  pbVar7 = (byte *)*param_1;\n  local_2c = *(int *)PTR___stack_chk_guard_000564b4;\n  iVar3 = (int)param_2 - (int)pbVar7;\n  if (param_2 <= pbVar7) goto LAB_000219c0;\n  if (PTR_localeinfo_00056174[1] == '\0') {\n    local_34 = 0;\n    local_30 = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    pbVar5 = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }\n  }\n  else {\n    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    pbVar8 = param_2 + -uVar4;\n    local_34 = 0;\n    local_30 = 0;\n    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];\n    if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }\n    pbVar5 = param_2;\n    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }\n  }\nLAB_000219b4:\n  *param_1 = pbVar5;\n  if (pbVar5 == param_2) goto LAB_00021ad0;\n  iVar3 = (int)param_2 - (int)pbVar7;\nLAB_000219c0:\n  while (local_2c != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    iVar3 = 0;\n  }\n  return iVar3;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "undefined4 local_34;" type_identifier identifier ;) (declaration "undefined4 local_30;" type_identifier identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (expression_statement "puVar2 = PTR___stack_chk_guard_000564b4;" (assignment_expression "puVar2 = PTR___stack_chk_guard_000564b4" identifier = identifier) ;) (expression_statement "puVar1 = PTR_localeinfo_00056174;" (assignment_expression "puVar1 = PTR_localeinfo_00056174" identifier = identifier) ;) (expression_statement "pbVar7 = (byte *)*param_1;" (assignment_expression "pbVar7 = (byte *)*param_1" identifier = (cast_expression "(byte *)*param_1" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "local_2c = *(int *)PTR___stack_chk_guard_000564b4;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_000564b4" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000564b4" * (cast_expression "(int *)PTR___stack_chk_guard_000564b4" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "iVar3 = (int)param_2 - (int)pbVar7;" (assignment_expression "iVar3 = (int)param_2 - (int)pbVar7" identifier = (binary_expression "(int)param_2 - (int)pbVar7" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (param_2 <= pbVar7) goto LAB_000219c0;" if (parenthesized_expression "(param_2 <= pbVar7)" ( (binary_expression "param_2 <= pbVar7" identifier <= identifier) )) (goto_statement "goto LAB_000219c0;" goto statement_identifier ;)) (if_statement "if (PTR_localeinfo_00056174[1] == '\0') {\n    local_34 = 0;\n    local_30 = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    pbVar5 = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }\n  }\n  else {\n    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    pbVar8 = param_2 + -uVar4;\n    local_34 = 0;\n    local_30 = 0;\n    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];\n    if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }\n    pbVar5 = param_2;\n    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }\n  }" if (parenthesized_expression "(PTR_localeinfo_00056174[1] == '\0')" ( (binary_expression "PTR_localeinfo_00056174[1] == '\0'" (subscript_expression "PTR_localeinfo_00056174[1]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    local_34 = 0;\n    local_30 = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    pbVar5 = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }\n  }" { (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) ;) (expression_statement "uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];" (assignment_expression "uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2]" identifier = (cast_expression "(uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(char)PTR_localeinfo_00056174[*pbVar7 + 2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "PTR_localeinfo_00056174[*pbVar7 + 2]" identifier [ (binary_expression "*pbVar7 + 2" (pointer_expression "*pbVar7" * identifier) + number_literal) ])))) ;) (expression_statement "pbVar5 = pbVar7;" (assignment_expression "pbVar5 = pbVar7" identifier = identifier) ;) (if_statement "if (uVar4 == 0xfffffffe) goto LAB_00021980;" if (parenthesized_expression "(uVar4 == 0xfffffffe)" ( (binary_expression "uVar4 == 0xfffffffe" identifier == number_literal) )) (goto_statement "goto LAB_00021980;" goto statement_identifier ;)) (labeled_statement "LAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;" statement_identifier : (if_statement "if (0xfffffffd < uVar4) goto LAB_000219a0;" if (parenthesized_expression "(0xfffffffd < uVar4)" ( (binary_expression "0xfffffffd < uVar4" number_literal < identifier) )) (goto_statement "goto LAB_000219a0;" goto statement_identifier ;))) (while_statement "while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }" while (parenthesized_expression "(pbVar5 = pbVar7 + uVar4, pbVar5 < param_2)" ( (comma_expression "pbVar5 = pbVar7 + uVar4, pbVar5 < param_2" (assignment_expression "pbVar5 = pbVar7 + uVar4" identifier = (binary_expression "pbVar7 + uVar4" identifier + identifier)) , (binary_expression "pbVar5 < param_2" identifier < identifier)) )) (compound_statement "{\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }" { (while_statement "while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }" { (expression_statement "uVar4 = (uint)(char)puVar1[*pbVar5 + 2];" (assignment_expression "uVar4 = (uint)(char)puVar1[*pbVar5 + 2]" identifier = (cast_expression "(uint)(char)puVar1[*pbVar5 + 2]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(char)puVar1[*pbVar5 + 2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "puVar1[*pbVar5 + 2]" identifier [ (binary_expression "*pbVar5 + 2" (pointer_expression "*pbVar5" * identifier) + number_literal) ])))) ;) (expression_statement "pbVar7 = pbVar5;" (assignment_expression "pbVar7 = pbVar5" identifier = identifier) ;) (if_statement "if (uVar4 != 0xfffffffe) goto LAB_00021950;" if (parenthesized_expression "(uVar4 != 0xfffffffe)" ( (binary_expression "uVar4 != 0xfffffffe" identifier != number_literal) )) (goto_statement "goto LAB_00021950;" goto statement_identifier ;)) (labeled_statement "LAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);" statement_identifier : (expression_statement "uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);" (assignment_expression "uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34)" identifier = (call_expression "rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34)" identifier (argument_list "(pbVar5,(int)param_3 - (int)pbVar5,&local_34)" ( identifier , (binary_expression "(int)param_3 - (int)pbVar5" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar5" ( (type_descriptor "int" primitive_type) ) identifier)) , (pointer_expression "&local_34" & identifier) )))) ;)) (expression_statement "pbVar7 = pbVar5;" (assignment_expression "pbVar7 = pbVar5" identifier = identifier) ;) (if_statement "if (uVar4 < 0xfffffffe) break;" if (parenthesized_expression "(uVar4 < 0xfffffffe)" ( (binary_expression "uVar4 < 0xfffffffe" identifier < number_literal) )) (break_statement "break;" break ;)) (labeled_statement "LAB_000219a0:\n        pbVar5 = pbVar7 + 1;" statement_identifier : (expression_statement "pbVar5 = pbVar7 + 1;" (assignment_expression "pbVar5 = pbVar7 + 1" identifier = (binary_expression "pbVar7 + 1" identifier + number_literal)) ;)) (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) ;) (if_statement "if (param_2 <= pbVar5) goto LAB_000219b4;" if (parenthesized_expression "(param_2 <= pbVar5)" ( (binary_expression "param_2 <= pbVar5" identifier <= identifier) )) (goto_statement "goto LAB_000219b4;" goto statement_identifier ;)) })) })) }) (else_clause "else {\n    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    pbVar8 = param_2 + -uVar4;\n    local_34 = 0;\n    local_30 = 0;\n    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];\n    if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }\n    pbVar5 = param_2;\n    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }\n  }" else (compound_statement "{\n    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    pbVar8 = param_2 + -uVar4;\n    local_34 = 0;\n    local_30 = 0;\n    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];\n    if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }\n    pbVar5 = param_2;\n    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }\n  }" { (if_statement "if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }" if (parenthesized_expression "((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80))" ( (binary_expression "(param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)" (parenthesized_expression "(param_3 <= param_2)" ( (binary_expression "param_3 <= param_2" identifier <= identifier) )) || (parenthesized_expression "(((int)(char)*param_2 & 0xc0U) != 0x80)" ( (binary_expression "((int)(char)*param_2 & 0xc0U) != 0x80" (parenthesized_expression "((int)(char)*param_2 & 0xc0U)" ( (binary_expression "(int)(char)*param_2 & 0xc0U" (cast_expression "(int)(char)*param_2" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)*param_2" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_2" * identifier))) & number_literal) )) != number_literal) ))) )) (compound_statement "{\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }" { (labeled_statement "LAB_00021a4c:\n      iVar3 = 0;" statement_identifier : (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;)) (expression_statement "*param_1 = param_2;" (assignment_expression "*param_1 = param_2" (pointer_expression "*param_1" * identifier) = identifier) ;) (goto_statement "goto LAB_000219c0;" goto statement_identifier ;) })) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) (if_statement "if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }" if (parenthesized_expression "(((int)(char)param_2[-1] & 0xc0U) == 0x80)" ( (binary_expression "((int)(char)param_2[-1] & 0xc0U) == 0x80" (parenthesized_expression "((int)(char)param_2[-1] & 0xc0U)" ( (binary_expression "(int)(char)param_2[-1] & 0xc0U" (cast_expression "(int)(char)param_2[-1]" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)param_2[-1]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_2[-1]" identifier [ number_literal ]))) & number_literal) )) == number_literal) )) (compound_statement "{\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }" { (if_statement "if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }" if (parenthesized_expression "(((int)(char)param_2[-2] & 0xc0U) == 0x80)" ( (binary_expression "((int)(char)param_2[-2] & 0xc0U) == 0x80" (parenthesized_expression "((int)(char)param_2[-2] & 0xc0U)" ( (binary_expression "(int)(char)param_2[-2] & 0xc0U" (cast_expression "(int)(char)param_2[-2]" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)param_2[-2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_2[-2]" identifier [ number_literal ]))) & number_literal) )) == number_literal) )) (compound_statement "{\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }" { (expression_statement "uVar4 = 3;" (assignment_expression "uVar4 = 3" identifier = number_literal) ;) (if_statement "if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;" if (parenthesized_expression "(((int)(char)param_2[-3] & 0xc0U) == 0x80)" ( (binary_expression "((int)(char)param_2[-3] & 0xc0U) == 0x80" (parenthesized_expression "((int)(char)param_2[-3] & 0xc0U)" ( (binary_expression "(int)(char)param_2[-3] & 0xc0U" (cast_expression "(int)(char)param_2[-3]" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)param_2[-3]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_2[-3]" identifier [ number_literal ]))) & number_literal) )) == number_literal) )) (goto_statement "goto LAB_00021a4c;" goto statement_identifier ;)) }) (else_clause "else {\n        uVar4 = 2;\n      }" else (compound_statement "{\n        uVar4 = 2;\n      }" { (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" identifier = number_literal) ;) }))) })) (expression_statement "pbVar8 = param_2 + -uVar4;" (assignment_expression "pbVar8 = param_2 + -uVar4" identifier = (binary_expression "param_2 + -uVar4" identifier + (unary_expression "-uVar4" - 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) ;) (expression_statement "uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];" (assignment_expression "uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2]" identifier = (cast_expression "(uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(char)PTR_localeinfo_00056174[*pbVar8 + 2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "PTR_localeinfo_00056174[*pbVar8 + 2]" identifier [ (binary_expression "*pbVar8 + 2" (pointer_expression "*pbVar8" * identifier) + number_literal) ])))) ;) (if_statement "if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }" if (parenthesized_expression "(uVar6 == 0xfffffffe)" ( (binary_expression "uVar6 == 0xfffffffe" identifier == number_literal) )) (compound_statement "{\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }" { (expression_statement "uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);" (assignment_expression "uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34)" identifier = (call_expression "rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34)" identifier (argument_list "(pbVar8,(int)param_3 - (int)pbVar8,&local_34)" ( identifier , (binary_expression "(int)param_3 - (int)pbVar8" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar8" ( (type_descriptor "int" primitive_type) ) identifier)) , (pointer_expression "&local_34" & identifier) )))) ;) })) (expression_statement "pbVar5 = param_2;" (assignment_expression "pbVar5 = param_2" identifier = identifier) ;) (if_statement "if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }" if (parenthesized_expression "((uVar4 < uVar6) && (uVar6 < 0xfffffffe))" ( (binary_expression "(uVar4 < uVar6) && (uVar6 < 0xfffffffe)" (parenthesized_expression "(uVar4 < uVar6)" ( (binary_expression "uVar4 < uVar6" identifier < identifier) )) && (parenthesized_expression "(uVar6 < 0xfffffffe)" ( (binary_expression "uVar6 < 0xfffffffe" identifier < number_literal) ))) )) (compound_statement "{\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }" { (expression_statement "pbVar5 = pbVar8 + uVar6;" (assignment_expression "pbVar5 = pbVar8 + uVar6" identifier = (binary_expression "pbVar8 + uVar6" identifier + identifier)) ;) (expression_statement "pbVar7 = pbVar8;" (assignment_expression "pbVar7 = pbVar8" identifier = identifier) ;) })) }))) (labeled_statement "LAB_000219b4:\n  *param_1 = pbVar5;" statement_identifier : (expression_statement "*param_1 = pbVar5;" (assignment_expression "*param_1 = pbVar5" (pointer_expression "*param_1" * identifier) = identifier) ;)) (if_statement "if (pbVar5 == param_2) goto LAB_00021ad0;" if (parenthesized_expression "(pbVar5 == param_2)" ( (binary_expression "pbVar5 == param_2" identifier == identifier) )) (goto_statement "goto LAB_00021ad0;" goto statement_identifier ;)) (expression_statement "iVar3 = (int)param_2 - (int)pbVar7;" (assignment_expression "iVar3 = (int)param_2 - (int)pbVar7" identifier = (binary_expression "(int)param_2 - (int)pbVar7" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (labeled_statement "LAB_000219c0:\n  while (local_2c != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    iVar3 = 0;\n  }" statement_identifier : (while_statement "while (local_2c != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    iVar3 = 0;\n  }" while (parenthesized_expression "(local_2c != *(int *)puVar2)" ( (binary_expression "local_2c != *(int *)puVar2" identifier != (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    iVar3 = 0;\n  }" { (expression_statement "(*(code *)PTR___stack_chk_fail_00056494)();" (call_expression "(*(code *)PTR___stack_chk_fail_00056494)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00056494)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00056494" * (cast_expression "(code *)PTR___stack_chk_fail_00056494" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (labeled_statement "LAB_00021ad0:\n    iVar3 = 0;" statement_identifier : (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;)) }))) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "ptrdiff_t mb_goback(char **mb_start,char *cur,char *end)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  ptrdiff_t pVar3;\n  uint uVar4;\n  byte *s;\n  int iVar5;\n  size_t sVar6;\n  byte *pbVar7;\n  byte *s_00;\n  mbstate_t mbs;\n  \n  puVar2 = PTR___stack_chk_guard_000564b4;\n  puVar1 = PTR_localeinfo_00056174;\n  pbVar7 = (byte *)*mb_start;\n  iVar5 = *(int *)PTR___stack_chk_guard_000564b4;\n  pVar3 = (int)cur - (int)pbVar7;\n  if (cur <= pbVar7) goto LAB_000219c0;\n  if (PTR_localeinfo_00056174[1] == '\0') {\n    mbs.__count = 0;\n    mbs.__value.__wch = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    s = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (s = pbVar7 + uVar4, s < cur) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*s + 2];\n        pbVar7 = s;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen((char *)s,(int)end - (int)s,&mbs);\n        pbVar7 = s;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        s = pbVar7 + 1;\n        mbs.__count = 0;\n        mbs.__value.__wch = 0;\n        if (cur <= s) goto LAB_000219b4;\n      }\n    }\n  }\n  else {\n    if ((end <= cur) || (((int)*cur & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      pVar3 = 0;\n      *mb_start = cur;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)cur[-1] & 0xc0U) == 0x80) {\n      if (((int)cur[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)cur[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    s_00 = (byte *)(cur + -uVar4);\n    mbs.__count = 0;\n    mbs.__value.__wch = 0;\n    sVar6 = (size_t)(char)PTR_localeinfo_00056174[*s_00 + 2];\n    if (sVar6 == 0xfffffffe) {\n      sVar6 = rpl_mbrlen((char *)s_00,(int)end - (int)s_00,&mbs);\n    }\n    s = (byte *)cur;\n    if ((uVar4 < sVar6) && (sVar6 < 0xfffffffe)) {\n      s = s_00 + sVar6;\n      pbVar7 = s_00;\n    }\n  }\nLAB_000219b4:\n  *mb_start = (char *)s;\n  if (s == (byte *)cur) goto LAB_00021ad0;\n  pVar3 = (int)cur - (int)pbVar7;\nLAB_000219c0:\n  while (iVar5 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    pVar3 = 0;\n  }\n  return pVar3;\n}\n\n" (function_definition "ptrdiff_t mb_goback(char **mb_start,char *cur,char *end)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  ptrdiff_t pVar3;\n  uint uVar4;\n  byte *s;\n  int iVar5;\n  size_t sVar6;\n  byte *pbVar7;\n  byte *s_00;\n  mbstate_t mbs;\n  \n  puVar2 = PTR___stack_chk_guard_000564b4;\n  puVar1 = PTR_localeinfo_00056174;\n  pbVar7 = (byte *)*mb_start;\n  iVar5 = *(int *)PTR___stack_chk_guard_000564b4;\n  pVar3 = (int)cur - (int)pbVar7;\n  if (cur <= pbVar7) goto LAB_000219c0;\n  if (PTR_localeinfo_00056174[1] == '\0') {\n    mbs.__count = 0;\n    mbs.__value.__wch = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    s = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (s = pbVar7 + uVar4, s < cur) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*s + 2];\n        pbVar7 = s;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen((char *)s,(int)end - (int)s,&mbs);\n        pbVar7 = s;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        s = pbVar7 + 1;\n        mbs.__count = 0;\n        mbs.__value.__wch = 0;\n        if (cur <= s) goto LAB_000219b4;\n      }\n    }\n  }\n  else {\n    if ((end <= cur) || (((int)*cur & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      pVar3 = 0;\n      *mb_start = cur;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)cur[-1] & 0xc0U) == 0x80) {\n      if (((int)cur[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)cur[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    s_00 = (byte *)(cur + -uVar4);\n    mbs.__count = 0;\n    mbs.__value.__wch = 0;\n    sVar6 = (size_t)(char)PTR_localeinfo_00056174[*s_00 + 2];\n    if (sVar6 == 0xfffffffe) {\n      sVar6 = rpl_mbrlen((char *)s_00,(int)end - (int)s_00,&mbs);\n    }\n    s = (byte *)cur;\n    if ((uVar4 < sVar6) && (sVar6 < 0xfffffffe)) {\n      s = s_00 + sVar6;\n      pbVar7 = s_00;\n    }\n  }\nLAB_000219b4:\n  *mb_start = (char *)s;\n  if (s == (byte *)cur) goto LAB_00021ad0;\n  pVar3 = (int)cur - (int)pbVar7;\nLAB_000219c0:\n  while (iVar5 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    pVar3 = 0;\n  }\n  return pVar3;\n}" primitive_type (function_declarator "mb_goback(char **mb_start,char *cur,char *end)" identifier (parameter_list "(char **mb_start,char *cur,char *end)" ( (parameter_declaration "char **mb_start" primitive_type (pointer_declarator "**mb_start" * (pointer_declarator "*mb_start" * identifier))) , (parameter_declaration "char *cur" primitive_type (pointer_declarator "*cur" * identifier)) , (parameter_declaration "char *end" primitive_type (pointer_declarator "*end" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  ptrdiff_t pVar3;\n  uint uVar4;\n  byte *s;\n  int iVar5;\n  size_t sVar6;\n  byte *pbVar7;\n  byte *s_00;\n  mbstate_t mbs;\n  \n  puVar2 = PTR___stack_chk_guard_000564b4;\n  puVar1 = PTR_localeinfo_00056174;\n  pbVar7 = (byte *)*mb_start;\n  iVar5 = *(int *)PTR___stack_chk_guard_000564b4;\n  pVar3 = (int)cur - (int)pbVar7;\n  if (cur <= pbVar7) goto LAB_000219c0;\n  if (PTR_localeinfo_00056174[1] == '\0') {\n    mbs.__count = 0;\n    mbs.__value.__wch = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    s = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (s = pbVar7 + uVar4, s < cur) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*s + 2];\n        pbVar7 = s;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen((char *)s,(int)end - (int)s,&mbs);\n        pbVar7 = s;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        s = pbVar7 + 1;\n        mbs.__count = 0;\n        mbs.__value.__wch = 0;\n        if (cur <= s) goto LAB_000219b4;\n      }\n    }\n  }\n  else {\n    if ((end <= cur) || (((int)*cur & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      pVar3 = 0;\n      *mb_start = cur;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)cur[-1] & 0xc0U) == 0x80) {\n      if (((int)cur[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)cur[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    s_00 = (byte *)(cur + -uVar4);\n    mbs.__count = 0;\n    mbs.__value.__wch = 0;\n    sVar6 = (size_t)(char)PTR_localeinfo_00056174[*s_00 + 2];\n    if (sVar6 == 0xfffffffe) {\n      sVar6 = rpl_mbrlen((char *)s_00,(int)end - (int)s_00,&mbs);\n    }\n    s = (byte *)cur;\n    if ((uVar4 < sVar6) && (sVar6 < 0xfffffffe)) {\n      s = s_00 + sVar6;\n      pbVar7 = s_00;\n    }\n  }\nLAB_000219b4:\n  *mb_start = (char *)s;\n  if (s == (byte *)cur) goto LAB_00021ad0;\n  pVar3 = (int)cur - (int)pbVar7;\nLAB_000219c0:\n  while (iVar5 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    pVar3 = 0;\n  }\n  return pVar3;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "ptrdiff_t pVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "byte *s;" type_identifier (pointer_declarator "*s" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (declaration "byte *s_00;" type_identifier (pointer_declarator "*s_00" * identifier) ;) (declaration "mbstate_t mbs;" type_identifier identifier ;) (expression_statement "puVar2 = PTR___stack_chk_guard_000564b4;" (assignment_expression "puVar2 = PTR___stack_chk_guard_000564b4" identifier = identifier) ;) (expression_statement "puVar1 = PTR_localeinfo_00056174;" (assignment_expression "puVar1 = PTR_localeinfo_00056174" identifier = identifier) ;) (expression_statement "pbVar7 = (byte *)*mb_start;" (assignment_expression "pbVar7 = (byte *)*mb_start" identifier = (cast_expression "(byte *)*mb_start" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*mb_start" * identifier))) ;) (expression_statement "iVar5 = *(int *)PTR___stack_chk_guard_000564b4;" (assignment_expression "iVar5 = *(int *)PTR___stack_chk_guard_000564b4" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000564b4" * (cast_expression "(int *)PTR___stack_chk_guard_000564b4" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "pVar3 = (int)cur - (int)pbVar7;" (assignment_expression "pVar3 = (int)cur - (int)pbVar7" identifier = (binary_expression "(int)cur - (int)pbVar7" (cast_expression "(int)cur" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (cur <= pbVar7) goto LAB_000219c0;" if (parenthesized_expression "(cur <= pbVar7)" ( (binary_expression "cur <= pbVar7" identifier <= identifier) )) (goto_statement "goto LAB_000219c0;" goto statement_identifier ;)) (if_statement "if (PTR_localeinfo_00056174[1] == '\0') {\n    mbs.__count = 0;\n    mbs.__value.__wch = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    s = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (s = pbVar7 + uVar4, s < cur) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*s + 2];\n        pbVar7 = s;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen((char *)s,(int)end - (int)s,&mbs);\n        pbVar7 = s;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        s = pbVar7 + 1;\n        mbs.__count = 0;\n        mbs.__value.__wch = 0;\n        if (cur <= s) goto LAB_000219b4;\n      }\n    }\n  }\n  else {\n    if ((end <= cur) || (((int)*cur & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      pVar3 = 0;\n      *mb_start = cur;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)cur[-1] & 0xc0U) == 0x80) {\n      if (((int)cur[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)cur[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    s_00 = (byte *)(cur + -uVar4);\n    mbs.__count = 0;\n    mbs.__value.__wch = 0;\n    sVar6 = (size_t)(char)PTR_localeinfo_00056174[*s_00 + 2];\n    if (sVar6 == 0xfffffffe) {\n      sVar6 = rpl_mbrlen((char *)s_00,(int)end - (int)s_00,&mbs);\n    }\n    s = (byte *)cur;\n    if ((uVar4 < sVar6) && (sVar6 < 0xfffffffe)) {\n      s = s_00 + sVar6;\n      pbVar7 = s_00;\n    }\n  }" if (parenthesized_expression "(PTR_localeinfo_00056174[1] == '\0')" ( (binary_expression "PTR_localeinfo_00056174[1] == '\0'" (subscript_expression "PTR_localeinfo_00056174[1]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    mbs.__count = 0;\n    mbs.__value.__wch = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    s = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (s = pbVar7 + uVar4, s < cur) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*s + 2];\n        pbVar7 = s;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen((char *)s,(int)end - (int)s,&mbs);\n        pbVar7 = s;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        s = pbVar7 + 1;\n        mbs.__count = 0;\n        mbs.__value.__wch = 0;\n        if (cur <= s) goto LAB_000219b4;\n      }\n    }\n  }" { (expression_statement "mbs.__count = 0;" (assignment_expression "mbs.__count = 0" (field_expression "mbs.__count" identifier . field_identifier) = number_literal) ;) (expression_statement "mbs.__value.__wch = 0;" (assignment_expression "mbs.__value.__wch = 0" (field_expression "mbs.__value.__wch" (field_expression "mbs.__value" identifier . field_identifier) . field_identifier) = number_literal) ;) (expression_statement "uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];" (assignment_expression "uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2]" identifier = (cast_expression "(uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(char)PTR_localeinfo_00056174[*pbVar7 + 2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "PTR_localeinfo_00056174[*pbVar7 + 2]" identifier [ (binary_expression "*pbVar7 + 2" (pointer_expression "*pbVar7" * identifier) + number_literal) ])))) ;) (expression_statement "s = pbVar7;" (assignment_expression "s = pbVar7" identifier = identifier) ;) (if_statement "if (uVar4 == 0xfffffffe) goto LAB_00021980;" if (parenthesized_expression "(uVar4 == 0xfffffffe)" ( (binary_expression "uVar4 == 0xfffffffe" identifier == number_literal) )) (goto_statement "goto LAB_00021980;" goto statement_identifier ;)) (labeled_statement "LAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;" statement_identifier : (if_statement "if (0xfffffffd < uVar4) goto LAB_000219a0;" if (parenthesized_expression "(0xfffffffd < uVar4)" ( (binary_expression "0xfffffffd < uVar4" number_literal < identifier) )) (goto_statement "goto LAB_000219a0;" goto statement_identifier ;))) (while_statement "while (s = pbVar7 + uVar4, s < cur) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*s + 2];\n        pbVar7 = s;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen((char *)s,(int)end - (int)s,&mbs);\n        pbVar7 = s;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        s = pbVar7 + 1;\n        mbs.__count = 0;\n        mbs.__value.__wch = 0;\n        if (cur <= s) goto LAB_000219b4;\n      }\n    }" while (parenthesized_expression "(s = pbVar7 + uVar4, s < cur)" ( (comma_expression "s = pbVar7 + uVar4, s < cur" (assignment_expression "s = pbVar7 + uVar4" identifier = (binary_expression "pbVar7 + uVar4" identifier + identifier)) , (binary_expression "s < cur" identifier < identifier)) )) (compound_statement "{\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*s + 2];\n        pbVar7 = s;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen((char *)s,(int)end - (int)s,&mbs);\n        pbVar7 = s;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        s = pbVar7 + 1;\n        mbs.__count = 0;\n        mbs.__value.__wch = 0;\n        if (cur <= s) goto LAB_000219b4;\n      }\n    }" { (while_statement "while( true ) {\n        uVar4 = (uint)(char)puVar1[*s + 2];\n        pbVar7 = s;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen((char *)s,(int)end - (int)s,&mbs);\n        pbVar7 = s;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        s = pbVar7 + 1;\n        mbs.__count = 0;\n        mbs.__value.__wch = 0;\n        if (cur <= s) goto LAB_000219b4;\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        uVar4 = (uint)(char)puVar1[*s + 2];\n        pbVar7 = s;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen((char *)s,(int)end - (int)s,&mbs);\n        pbVar7 = s;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        s = pbVar7 + 1;\n        mbs.__count = 0;\n        mbs.__value.__wch = 0;\n        if (cur <= s) goto LAB_000219b4;\n      }" { (expression_statement "uVar4 = (uint)(char)puVar1[*s + 2];" (assignment_expression "uVar4 = (uint)(char)puVar1[*s + 2]" identifier = (cast_expression "(uint)(char)puVar1[*s + 2]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(char)puVar1[*s + 2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "puVar1[*s + 2]" identifier [ (binary_expression "*s + 2" (pointer_expression "*s" * identifier) + number_literal) ])))) ;) (expression_statement "pbVar7 = s;" (assignment_expression "pbVar7 = s" identifier = identifier) ;) (if_statement "if (uVar4 != 0xfffffffe) goto LAB_00021950;" if (parenthesized_expression "(uVar4 != 0xfffffffe)" ( (binary_expression "uVar4 != 0xfffffffe" identifier != number_literal) )) (goto_statement "goto LAB_00021950;" goto statement_identifier ;)) (labeled_statement "LAB_00021980:\n        uVar4 = rpl_mbrlen((char *)s,(int)end - (int)s,&mbs);" statement_identifier : (expression_statement "uVar4 = rpl_mbrlen((char *)s,(int)end - (int)s,&mbs);" (assignment_expression "uVar4 = rpl_mbrlen((char *)s,(int)end - (int)s,&mbs)" identifier = (call_expression "rpl_mbrlen((char *)s,(int)end - (int)s,&mbs)" identifier (argument_list "((char *)s,(int)end - (int)s,&mbs)" ( (cast_expression "(char *)s" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , (binary_expression "(int)end - (int)s" (cast_expression "(int)end" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)s" ( (type_descriptor "int" primitive_type) ) identifier)) , (pointer_expression "&mbs" & identifier) )))) ;)) (expression_statement "pbVar7 = s;" (assignment_expression "pbVar7 = s" identifier = identifier) ;) (if_statement "if (uVar4 < 0xfffffffe) break;" if (parenthesized_expression "(uVar4 < 0xfffffffe)" ( (binary_expression "uVar4 < 0xfffffffe" identifier < number_literal) )) (break_statement "break;" break ;)) (labeled_statement "LAB_000219a0:\n        s = pbVar7 + 1;" statement_identifier : (expression_statement "s = pbVar7 + 1;" (assignment_expression "s = pbVar7 + 1" identifier = (binary_expression "pbVar7 + 1" identifier + number_literal)) ;)) (expression_statement "mbs.__count = 0;" (assignment_expression "mbs.__count = 0" (field_expression "mbs.__count" identifier . field_identifier) = number_literal) ;) (expression_statement "mbs.__value.__wch = 0;" (assignment_expression "mbs.__value.__wch = 0" (field_expression "mbs.__value.__wch" (field_expression "mbs.__value" identifier . field_identifier) . field_identifier) = number_literal) ;) (if_statement "if (cur <= s) goto LAB_000219b4;" if (parenthesized_expression "(cur <= s)" ( (binary_expression "cur <= s" identifier <= identifier) )) (goto_statement "goto LAB_000219b4;" goto statement_identifier ;)) })) })) }) (else_clause "else {\n    if ((end <= cur) || (((int)*cur & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      pVar3 = 0;\n      *mb_start = cur;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)cur[-1] & 0xc0U) == 0x80) {\n      if (((int)cur[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)cur[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    s_00 = (byte *)(cur + -uVar4);\n    mbs.__count = 0;\n    mbs.__value.__wch = 0;\n    sVar6 = (size_t)(char)PTR_localeinfo_00056174[*s_00 + 2];\n    if (sVar6 == 0xfffffffe) {\n      sVar6 = rpl_mbrlen((char *)s_00,(int)end - (int)s_00,&mbs);\n    }\n    s = (byte *)cur;\n    if ((uVar4 < sVar6) && (sVar6 < 0xfffffffe)) {\n      s = s_00 + sVar6;\n      pbVar7 = s_00;\n    }\n  }" else (compound_statement "{\n    if ((end <= cur) || (((int)*cur & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      pVar3 = 0;\n      *mb_start = cur;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)cur[-1] & 0xc0U) == 0x80) {\n      if (((int)cur[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)cur[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    s_00 = (byte *)(cur + -uVar4);\n    mbs.__count = 0;\n    mbs.__value.__wch = 0;\n    sVar6 = (size_t)(char)PTR_localeinfo_00056174[*s_00 + 2];\n    if (sVar6 == 0xfffffffe) {\n      sVar6 = rpl_mbrlen((char *)s_00,(int)end - (int)s_00,&mbs);\n    }\n    s = (byte *)cur;\n    if ((uVar4 < sVar6) && (sVar6 < 0xfffffffe)) {\n      s = s_00 + sVar6;\n      pbVar7 = s_00;\n    }\n  }" { (if_statement "if ((end <= cur) || (((int)*cur & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      pVar3 = 0;\n      *mb_start = cur;\n      goto LAB_000219c0;\n    }" if (parenthesized_expression "((end <= cur) || (((int)*cur & 0xc0U) != 0x80))" ( (binary_expression "(end <= cur) || (((int)*cur & 0xc0U) != 0x80)" (parenthesized_expression "(end <= cur)" ( (binary_expression "end <= cur" identifier <= identifier) )) || (parenthesized_expression "(((int)*cur & 0xc0U) != 0x80)" ( (binary_expression "((int)*cur & 0xc0U) != 0x80" (parenthesized_expression "((int)*cur & 0xc0U)" ( (binary_expression "(int)*cur & 0xc0U" (cast_expression "(int)*cur" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*cur" * identifier)) & number_literal) )) != number_literal) ))) )) (compound_statement "{\nLAB_00021a4c:\n      pVar3 = 0;\n      *mb_start = cur;\n      goto LAB_000219c0;\n    }" { (labeled_statement "LAB_00021a4c:\n      pVar3 = 0;" statement_identifier : (expression_statement "pVar3 = 0;" (assignment_expression "pVar3 = 0" identifier = number_literal) ;)) (expression_statement "*mb_start = cur;" (assignment_expression "*mb_start = cur" (pointer_expression "*mb_start" * identifier) = identifier) ;) (goto_statement "goto LAB_000219c0;" goto statement_identifier ;) })) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) (if_statement "if (((int)cur[-1] & 0xc0U) == 0x80) {\n      if (((int)cur[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)cur[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }" if (parenthesized_expression "(((int)cur[-1] & 0xc0U) == 0x80)" ( (binary_expression "((int)cur[-1] & 0xc0U) == 0x80" (parenthesized_expression "((int)cur[-1] & 0xc0U)" ( (binary_expression "(int)cur[-1] & 0xc0U" (cast_expression "(int)cur[-1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "cur[-1]" identifier [ number_literal ])) & number_literal) )) == number_literal) )) (compound_statement "{\n      if (((int)cur[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)cur[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }" { (if_statement "if (((int)cur[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)cur[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }" if (parenthesized_expression "(((int)cur[-2] & 0xc0U) == 0x80)" ( (binary_expression "((int)cur[-2] & 0xc0U) == 0x80" (parenthesized_expression "((int)cur[-2] & 0xc0U)" ( (binary_expression "(int)cur[-2] & 0xc0U" (cast_expression "(int)cur[-2]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "cur[-2]" identifier [ number_literal ])) & number_literal) )) == number_literal) )) (compound_statement "{\n        uVar4 = 3;\n        if (((int)cur[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }" { (expression_statement "uVar4 = 3;" (assignment_expression "uVar4 = 3" identifier = number_literal) ;) (if_statement "if (((int)cur[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;" if (parenthesized_expression "(((int)cur[-3] & 0xc0U) == 0x80)" ( (binary_expression "((int)cur[-3] & 0xc0U) == 0x80" (parenthesized_expression "((int)cur[-3] & 0xc0U)" ( (binary_expression "(int)cur[-3] & 0xc0U" (cast_expression "(int)cur[-3]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "cur[-3]" identifier [ number_literal ])) & number_literal) )) == number_literal) )) (goto_statement "goto LAB_00021a4c;" goto statement_identifier ;)) }) (else_clause "else {\n        uVar4 = 2;\n      }" else (compound_statement "{\n        uVar4 = 2;\n      }" { (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" identifier = number_literal) ;) }))) })) (expression_statement "s_00 = (byte *)(cur + -uVar4);" (assignment_expression "s_00 = (byte *)(cur + -uVar4)" identifier = (cast_expression "(byte *)(cur + -uVar4)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(cur + -uVar4)" ( (binary_expression "cur + -uVar4" identifier + (unary_expression "-uVar4" - identifier)) )))) ;) (expression_statement "mbs.__count = 0;" (assignment_expression "mbs.__count = 0" (field_expression "mbs.__count" identifier . field_identifier) = number_literal) ;) (expression_statement "mbs.__value.__wch = 0;" (assignment_expression "mbs.__value.__wch = 0" (field_expression "mbs.__value.__wch" (field_expression "mbs.__value" identifier . field_identifier) . field_identifier) = number_literal) ;) (expression_statement "sVar6 = (size_t)(char)PTR_localeinfo_00056174[*s_00 + 2];" (assignment_expression "sVar6 = (size_t)(char)PTR_localeinfo_00056174[*s_00 + 2]" identifier = (cast_expression "(size_t)(char)PTR_localeinfo_00056174[*s_00 + 2]" ( (type_descriptor "size_t" primitive_type) ) (cast_expression "(char)PTR_localeinfo_00056174[*s_00 + 2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "PTR_localeinfo_00056174[*s_00 + 2]" identifier [ (binary_expression "*s_00 + 2" (pointer_expression "*s_00" * identifier) + number_literal) ])))) ;) (if_statement "if (sVar6 == 0xfffffffe) {\n      sVar6 = rpl_mbrlen((char *)s_00,(int)end - (int)s_00,&mbs);\n    }" if (parenthesized_expression "(sVar6 == 0xfffffffe)" ( (binary_expression "sVar6 == 0xfffffffe" identifier == number_literal) )) (compound_statement "{\n      sVar6 = rpl_mbrlen((char *)s_00,(int)end - (int)s_00,&mbs);\n    }" { (expression_statement "sVar6 = rpl_mbrlen((char *)s_00,(int)end - (int)s_00,&mbs);" (assignment_expression "sVar6 = rpl_mbrlen((char *)s_00,(int)end - (int)s_00,&mbs)" identifier = (call_expression "rpl_mbrlen((char *)s_00,(int)end - (int)s_00,&mbs)" identifier (argument_list "((char *)s_00,(int)end - (int)s_00,&mbs)" ( (cast_expression "(char *)s_00" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , (binary_expression "(int)end - (int)s_00" (cast_expression "(int)end" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)s_00" ( (type_descriptor "int" primitive_type) ) identifier)) , (pointer_expression "&mbs" & identifier) )))) ;) })) (expression_statement "s = (byte *)cur;" (assignment_expression "s = (byte *)cur" identifier = (cast_expression "(byte *)cur" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if ((uVar4 < sVar6) && (sVar6 < 0xfffffffe)) {\n      s = s_00 + sVar6;\n      pbVar7 = s_00;\n    }" if (parenthesized_expression "((uVar4 < sVar6) && (sVar6 < 0xfffffffe))" ( (binary_expression "(uVar4 < sVar6) && (sVar6 < 0xfffffffe)" (parenthesized_expression "(uVar4 < sVar6)" ( (binary_expression "uVar4 < sVar6" identifier < identifier) )) && (parenthesized_expression "(sVar6 < 0xfffffffe)" ( (binary_expression "sVar6 < 0xfffffffe" identifier < number_literal) ))) )) (compound_statement "{\n      s = s_00 + sVar6;\n      pbVar7 = s_00;\n    }" { (expression_statement "s = s_00 + sVar6;" (assignment_expression "s = s_00 + sVar6" identifier = (binary_expression "s_00 + sVar6" identifier + identifier)) ;) (expression_statement "pbVar7 = s_00;" (assignment_expression "pbVar7 = s_00" identifier = identifier) ;) })) }))) (labeled_statement "LAB_000219b4:\n  *mb_start = (char *)s;" statement_identifier : (expression_statement "*mb_start = (char *)s;" (assignment_expression "*mb_start = (char *)s" (pointer_expression "*mb_start" * identifier) = (cast_expression "(char *)s" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;)) (if_statement "if (s == (byte *)cur) goto LAB_00021ad0;" if (parenthesized_expression "(s == (byte *)cur)" ( (binary_expression "s == (byte *)cur" identifier == (cast_expression "(byte *)cur" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (goto_statement "goto LAB_00021ad0;" goto statement_identifier ;)) (expression_statement "pVar3 = (int)cur - (int)pbVar7;" (assignment_expression "pVar3 = (int)cur - (int)pbVar7" identifier = (binary_expression "(int)cur - (int)pbVar7" (cast_expression "(int)cur" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (labeled_statement "LAB_000219c0:\n  while (iVar5 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    pVar3 = 0;\n  }" statement_identifier : (while_statement "while (iVar5 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    pVar3 = 0;\n  }" while (parenthesized_expression "(iVar5 != *(int *)puVar2)" ( (binary_expression "iVar5 != *(int *)puVar2" identifier != (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    pVar3 = 0;\n  }" { (expression_statement "(*(code *)PTR___stack_chk_fail_00056494)();" (call_expression "(*(code *)PTR___stack_chk_fail_00056494)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00056494)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00056494" * (cast_expression "(code *)PTR___stack_chk_fail_00056494" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (labeled_statement "LAB_00021ad0:\n    pVar3 = 0;" statement_identifier : (expression_statement "pVar3 = 0;" (assignment_expression "pVar3 = 0" identifier = number_literal) ;)) }))) (return_statement "return pVar3;" return identifier ;) })))
(translation_unit "int mb_goback(undefined4 *param_1,byte *param_2,byte *param_3)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar2 = PTR___stack_chk_guard_000564b4;\n  puVar1 = PTR_localeinfo_00056174;\n  pbVar7 = (byte *)*param_1;\n  local_2c = *(int *)PTR___stack_chk_guard_000564b4;\n  iVar3 = (int)param_2 - (int)pbVar7;\n  if (param_2 <= pbVar7) goto LAB_000219c0;\n  if (PTR_localeinfo_00056174[1] == '\0') {\n    local_34 = 0;\n    local_30 = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    pbVar5 = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }\n  }\n  else {\n    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    pbVar8 = param_2 + -uVar4;\n    local_34 = 0;\n    local_30 = 0;\n    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];\n    if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }\n    pbVar5 = param_2;\n    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }\n  }\nLAB_000219b4:\n  *param_1 = pbVar5;\n  if (pbVar5 == param_2) goto LAB_00021ad0;\n  iVar3 = (int)param_2 - (int)pbVar7;\nLAB_000219c0:\n  while (local_2c != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    iVar3 = 0;\n  }\n  return iVar3;\n}\n\n" (function_definition "int mb_goback(undefined4 *param_1,byte *param_2,byte *param_3)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar2 = PTR___stack_chk_guard_000564b4;\n  puVar1 = PTR_localeinfo_00056174;\n  pbVar7 = (byte *)*param_1;\n  local_2c = *(int *)PTR___stack_chk_guard_000564b4;\n  iVar3 = (int)param_2 - (int)pbVar7;\n  if (param_2 <= pbVar7) goto LAB_000219c0;\n  if (PTR_localeinfo_00056174[1] == '\0') {\n    local_34 = 0;\n    local_30 = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    pbVar5 = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }\n  }\n  else {\n    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    pbVar8 = param_2 + -uVar4;\n    local_34 = 0;\n    local_30 = 0;\n    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];\n    if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }\n    pbVar5 = param_2;\n    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }\n  }\nLAB_000219b4:\n  *param_1 = pbVar5;\n  if (pbVar5 == param_2) goto LAB_00021ad0;\n  iVar3 = (int)param_2 - (int)pbVar7;\nLAB_000219c0:\n  while (local_2c != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    iVar3 = 0;\n  }\n  return iVar3;\n}" primitive_type (function_declarator "mb_goback(undefined4 *param_1,byte *param_2,byte *param_3)" identifier (parameter_list "(undefined4 *param_1,byte *param_2,byte *param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "byte *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar2 = PTR___stack_chk_guard_000564b4;\n  puVar1 = PTR_localeinfo_00056174;\n  pbVar7 = (byte *)*param_1;\n  local_2c = *(int *)PTR___stack_chk_guard_000564b4;\n  iVar3 = (int)param_2 - (int)pbVar7;\n  if (param_2 <= pbVar7) goto LAB_000219c0;\n  if (PTR_localeinfo_00056174[1] == '\0') {\n    local_34 = 0;\n    local_30 = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    pbVar5 = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }\n  }\n  else {\n    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    pbVar8 = param_2 + -uVar4;\n    local_34 = 0;\n    local_30 = 0;\n    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];\n    if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }\n    pbVar5 = param_2;\n    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }\n  }\nLAB_000219b4:\n  *param_1 = pbVar5;\n  if (pbVar5 == param_2) goto LAB_00021ad0;\n  iVar3 = (int)param_2 - (int)pbVar7;\nLAB_000219c0:\n  while (local_2c != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    iVar3 = 0;\n  }\n  return iVar3;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "undefined4 local_34;" type_identifier identifier ;) (declaration "undefined4 local_30;" type_identifier identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (expression_statement "puVar2 = PTR___stack_chk_guard_000564b4;" (assignment_expression "puVar2 = PTR___stack_chk_guard_000564b4" identifier = identifier) ;) (expression_statement "puVar1 = PTR_localeinfo_00056174;" (assignment_expression "puVar1 = PTR_localeinfo_00056174" identifier = identifier) ;) (expression_statement "pbVar7 = (byte *)*param_1;" (assignment_expression "pbVar7 = (byte *)*param_1" identifier = (cast_expression "(byte *)*param_1" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "local_2c = *(int *)PTR___stack_chk_guard_000564b4;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_000564b4" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000564b4" * (cast_expression "(int *)PTR___stack_chk_guard_000564b4" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "iVar3 = (int)param_2 - (int)pbVar7;" (assignment_expression "iVar3 = (int)param_2 - (int)pbVar7" identifier = (binary_expression "(int)param_2 - (int)pbVar7" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (param_2 <= pbVar7) goto LAB_000219c0;" if (parenthesized_expression "(param_2 <= pbVar7)" ( (binary_expression "param_2 <= pbVar7" identifier <= identifier) )) (goto_statement "goto LAB_000219c0;" goto statement_identifier ;)) (if_statement "if (PTR_localeinfo_00056174[1] == '\0') {\n    local_34 = 0;\n    local_30 = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    pbVar5 = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }\n  }\n  else {\n    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    pbVar8 = param_2 + -uVar4;\n    local_34 = 0;\n    local_30 = 0;\n    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];\n    if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }\n    pbVar5 = param_2;\n    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }\n  }" if (parenthesized_expression "(PTR_localeinfo_00056174[1] == '\0')" ( (binary_expression "PTR_localeinfo_00056174[1] == '\0'" (subscript_expression "PTR_localeinfo_00056174[1]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    local_34 = 0;\n    local_30 = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    pbVar5 = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }\n  }" { (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) ;) (expression_statement "uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];" (assignment_expression "uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2]" identifier = (cast_expression "(uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(char)PTR_localeinfo_00056174[*pbVar7 + 2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "PTR_localeinfo_00056174[*pbVar7 + 2]" identifier [ (binary_expression "*pbVar7 + 2" (pointer_expression "*pbVar7" * identifier) + number_literal) ])))) ;) (expression_statement "pbVar5 = pbVar7;" (assignment_expression "pbVar5 = pbVar7" identifier = identifier) ;) (if_statement "if (uVar4 == 0xfffffffe) goto LAB_00021980;" if (parenthesized_expression "(uVar4 == 0xfffffffe)" ( (binary_expression "uVar4 == 0xfffffffe" identifier == number_literal) )) (goto_statement "goto LAB_00021980;" goto statement_identifier ;)) (labeled_statement "LAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;" statement_identifier : (if_statement "if (0xfffffffd < uVar4) goto LAB_000219a0;" if (parenthesized_expression "(0xfffffffd < uVar4)" ( (binary_expression "0xfffffffd < uVar4" number_literal < identifier) )) (goto_statement "goto LAB_000219a0;" goto statement_identifier ;))) (while_statement "while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }" while (parenthesized_expression "(pbVar5 = pbVar7 + uVar4, pbVar5 < param_2)" ( (comma_expression "pbVar5 = pbVar7 + uVar4, pbVar5 < param_2" (assignment_expression "pbVar5 = pbVar7 + uVar4" identifier = (binary_expression "pbVar7 + uVar4" identifier + identifier)) , (binary_expression "pbVar5 < param_2" identifier < identifier)) )) (compound_statement "{\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }" { (while_statement "while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }" { (expression_statement "uVar4 = (uint)(char)puVar1[*pbVar5 + 2];" (assignment_expression "uVar4 = (uint)(char)puVar1[*pbVar5 + 2]" identifier = (cast_expression "(uint)(char)puVar1[*pbVar5 + 2]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(char)puVar1[*pbVar5 + 2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "puVar1[*pbVar5 + 2]" identifier [ (binary_expression "*pbVar5 + 2" (pointer_expression "*pbVar5" * identifier) + number_literal) ])))) ;) (expression_statement "pbVar7 = pbVar5;" (assignment_expression "pbVar7 = pbVar5" identifier = identifier) ;) (if_statement "if (uVar4 != 0xfffffffe) goto LAB_00021950;" if (parenthesized_expression "(uVar4 != 0xfffffffe)" ( (binary_expression "uVar4 != 0xfffffffe" identifier != number_literal) )) (goto_statement "goto LAB_00021950;" goto statement_identifier ;)) (labeled_statement "LAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);" statement_identifier : (expression_statement "uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);" (assignment_expression "uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34)" identifier = (call_expression "rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34)" identifier (argument_list "(pbVar5,(int)param_3 - (int)pbVar5,&local_34)" ( identifier , (binary_expression "(int)param_3 - (int)pbVar5" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar5" ( (type_descriptor "int" primitive_type) ) identifier)) , (pointer_expression "&local_34" & identifier) )))) ;)) (expression_statement "pbVar7 = pbVar5;" (assignment_expression "pbVar7 = pbVar5" identifier = identifier) ;) (if_statement "if (uVar4 < 0xfffffffe) break;" if (parenthesized_expression "(uVar4 < 0xfffffffe)" ( (binary_expression "uVar4 < 0xfffffffe" identifier < number_literal) )) (break_statement "break;" break ;)) (labeled_statement "LAB_000219a0:\n        pbVar5 = pbVar7 + 1;" statement_identifier : (expression_statement "pbVar5 = pbVar7 + 1;" (assignment_expression "pbVar5 = pbVar7 + 1" identifier = (binary_expression "pbVar7 + 1" identifier + number_literal)) ;)) (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) ;) (if_statement "if (param_2 <= pbVar5) goto LAB_000219b4;" if (parenthesized_expression "(param_2 <= pbVar5)" ( (binary_expression "param_2 <= pbVar5" identifier <= identifier) )) (goto_statement "goto LAB_000219b4;" goto statement_identifier ;)) })) })) }) (else_clause "else {\n    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    pbVar8 = param_2 + -uVar4;\n    local_34 = 0;\n    local_30 = 0;\n    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];\n    if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }\n    pbVar5 = param_2;\n    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }\n  }" else (compound_statement "{\n    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    pbVar8 = param_2 + -uVar4;\n    local_34 = 0;\n    local_30 = 0;\n    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];\n    if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }\n    pbVar5 = param_2;\n    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }\n  }" { (if_statement "if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }" if (parenthesized_expression "((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80))" ( (binary_expression "(param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)" (parenthesized_expression "(param_3 <= param_2)" ( (binary_expression "param_3 <= param_2" identifier <= identifier) )) || (parenthesized_expression "(((int)(char)*param_2 & 0xc0U) != 0x80)" ( (binary_expression "((int)(char)*param_2 & 0xc0U) != 0x80" (parenthesized_expression "((int)(char)*param_2 & 0xc0U)" ( (binary_expression "(int)(char)*param_2 & 0xc0U" (cast_expression "(int)(char)*param_2" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)*param_2" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_2" * identifier))) & number_literal) )) != number_literal) ))) )) (compound_statement "{\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }" { (labeled_statement "LAB_00021a4c:\n      iVar3 = 0;" statement_identifier : (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;)) (expression_statement "*param_1 = param_2;" (assignment_expression "*param_1 = param_2" (pointer_expression "*param_1" * identifier) = identifier) ;) (goto_statement "goto LAB_000219c0;" goto statement_identifier ;) })) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) (if_statement "if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }" if (parenthesized_expression "(((int)(char)param_2[-1] & 0xc0U) == 0x80)" ( (binary_expression "((int)(char)param_2[-1] & 0xc0U) == 0x80" (parenthesized_expression "((int)(char)param_2[-1] & 0xc0U)" ( (binary_expression "(int)(char)param_2[-1] & 0xc0U" (cast_expression "(int)(char)param_2[-1]" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)param_2[-1]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_2[-1]" identifier [ number_literal ]))) & number_literal) )) == number_literal) )) (compound_statement "{\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }" { (if_statement "if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }" if (parenthesized_expression "(((int)(char)param_2[-2] & 0xc0U) == 0x80)" ( (binary_expression "((int)(char)param_2[-2] & 0xc0U) == 0x80" (parenthesized_expression "((int)(char)param_2[-2] & 0xc0U)" ( (binary_expression "(int)(char)param_2[-2] & 0xc0U" (cast_expression "(int)(char)param_2[-2]" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)param_2[-2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_2[-2]" identifier [ number_literal ]))) & number_literal) )) == number_literal) )) (compound_statement "{\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }" { (expression_statement "uVar4 = 3;" (assignment_expression "uVar4 = 3" identifier = number_literal) ;) (if_statement "if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;" if (parenthesized_expression "(((int)(char)param_2[-3] & 0xc0U) == 0x80)" ( (binary_expression "((int)(char)param_2[-3] & 0xc0U) == 0x80" (parenthesized_expression "((int)(char)param_2[-3] & 0xc0U)" ( (binary_expression "(int)(char)param_2[-3] & 0xc0U" (cast_expression "(int)(char)param_2[-3]" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)param_2[-3]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_2[-3]" identifier [ number_literal ]))) & number_literal) )) == number_literal) )) (goto_statement "goto LAB_00021a4c;" goto statement_identifier ;)) }) (else_clause "else {\n        uVar4 = 2;\n      }" else (compound_statement "{\n        uVar4 = 2;\n      }" { (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" identifier = number_literal) ;) }))) })) (expression_statement "pbVar8 = param_2 + -uVar4;" (assignment_expression "pbVar8 = param_2 + -uVar4" identifier = (binary_expression "param_2 + -uVar4" identifier + (unary_expression "-uVar4" - 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) ;) (expression_statement "uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];" (assignment_expression "uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2]" identifier = (cast_expression "(uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(char)PTR_localeinfo_00056174[*pbVar8 + 2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "PTR_localeinfo_00056174[*pbVar8 + 2]" identifier [ (binary_expression "*pbVar8 + 2" (pointer_expression "*pbVar8" * identifier) + number_literal) ])))) ;) (if_statement "if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }" if (parenthesized_expression "(uVar6 == 0xfffffffe)" ( (binary_expression "uVar6 == 0xfffffffe" identifier == number_literal) )) (compound_statement "{\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }" { (expression_statement "uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);" (assignment_expression "uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34)" identifier = (call_expression "rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34)" identifier (argument_list "(pbVar8,(int)param_3 - (int)pbVar8,&local_34)" ( identifier , (binary_expression "(int)param_3 - (int)pbVar8" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar8" ( (type_descriptor "int" primitive_type) ) identifier)) , (pointer_expression "&local_34" & identifier) )))) ;) })) (expression_statement "pbVar5 = param_2;" (assignment_expression "pbVar5 = param_2" identifier = identifier) ;) (if_statement "if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }" if (parenthesized_expression "((uVar4 < uVar6) && (uVar6 < 0xfffffffe))" ( (binary_expression "(uVar4 < uVar6) && (uVar6 < 0xfffffffe)" (parenthesized_expression "(uVar4 < uVar6)" ( (binary_expression "uVar4 < uVar6" identifier < identifier) )) && (parenthesized_expression "(uVar6 < 0xfffffffe)" ( (binary_expression "uVar6 < 0xfffffffe" identifier < number_literal) ))) )) (compound_statement "{\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }" { (expression_statement "pbVar5 = pbVar8 + uVar6;" (assignment_expression "pbVar5 = pbVar8 + uVar6" identifier = (binary_expression "pbVar8 + uVar6" identifier + identifier)) ;) (expression_statement "pbVar7 = pbVar8;" (assignment_expression "pbVar7 = pbVar8" identifier = identifier) ;) })) }))) (labeled_statement "LAB_000219b4:\n  *param_1 = pbVar5;" statement_identifier : (expression_statement "*param_1 = pbVar5;" (assignment_expression "*param_1 = pbVar5" (pointer_expression "*param_1" * identifier) = identifier) ;)) (if_statement "if (pbVar5 == param_2) goto LAB_00021ad0;" if (parenthesized_expression "(pbVar5 == param_2)" ( (binary_expression "pbVar5 == param_2" identifier == identifier) )) (goto_statement "goto LAB_00021ad0;" goto statement_identifier ;)) (expression_statement "iVar3 = (int)param_2 - (int)pbVar7;" (assignment_expression "iVar3 = (int)param_2 - (int)pbVar7" identifier = (binary_expression "(int)param_2 - (int)pbVar7" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (labeled_statement "LAB_000219c0:\n  while (local_2c != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    iVar3 = 0;\n  }" statement_identifier : (while_statement "while (local_2c != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    iVar3 = 0;\n  }" while (parenthesized_expression "(local_2c != *(int *)puVar2)" ( (binary_expression "local_2c != *(int *)puVar2" identifier != (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    iVar3 = 0;\n  }" { (expression_statement "(*(code *)PTR___stack_chk_fail_00056494)();" (call_expression "(*(code *)PTR___stack_chk_fail_00056494)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00056494)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_00056494" * (cast_expression "(code *)PTR___stack_chk_fail_00056494" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (labeled_statement "LAB_00021ad0:\n    iVar3 = 0;" statement_identifier : (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;)) }))) (return_statement "return iVar3;" 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 (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * 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 ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ (binary_expression (pointer_expression * IDENT) + LIT) ])))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (goto_statement goto statement_identifier ;))) (while_statement while (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression IDENT + IDENT)) , (binary_expression IDENT < IDENT)) )) (compound_statement { (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ (binary_expression (pointer_expression * IDENT) + LIT) ])))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) , (pointer_expression & IDENT) )))) ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (break_statement break ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;)) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (goto_statement goto statement_identifier ;)) })) })) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) || (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT))) & LIT) )) != LIT) ))) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) & LIT) )) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) & LIT) )) == LIT) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (unary_expression - IDENT))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ (binary_expression (pointer_expression * IDENT) + LIT) ])))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) , (pointer_expression & IDENT) )))) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < IDENT) )) && (parenthesized_expression ( (binary_expression IDENT < LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) }))) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (labeled_statement statement_identifier : (while_statement while (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) }))) (return_statement return IDENT ;) })))
(function_definition "int mb_goback(undefined4 *param_1,byte *param_2,byte *param_3)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar2 = PTR___stack_chk_guard_000564b4;\n  puVar1 = PTR_localeinfo_00056174;\n  pbVar7 = (byte *)*param_1;\n  local_2c = *(int *)PTR___stack_chk_guard_000564b4;\n  iVar3 = (int)param_2 - (int)pbVar7;\n  if (param_2 <= pbVar7) goto LAB_000219c0;\n  if (PTR_localeinfo_00056174[1] == '\0') {\n    local_34 = 0;\n    local_30 = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    pbVar5 = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }\n  }\n  else {\n    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    pbVar8 = param_2 + -uVar4;\n    local_34 = 0;\n    local_30 = 0;\n    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];\n    if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }\n    pbVar5 = param_2;\n    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }\n  }\nLAB_000219b4:\n  *param_1 = pbVar5;\n  if (pbVar5 == param_2) goto LAB_00021ad0;\n  iVar3 = (int)param_2 - (int)pbVar7;\nLAB_000219c0:\n  while (local_2c != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    iVar3 = 0;\n  }\n  return iVar3;\n}" (primitive_type "int") (function_declarator "mb_goback(undefined4 *param_1,byte *param_2,byte *param_3)" (identifier "mb_goback") (parameter_list "(undefined4 *param_1,byte *param_2,byte *param_3)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "byte *param_2" (type_identifier "byte") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "byte *param_3" (type_identifier "byte") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  uint uVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  undefined4 local_34;\n  undefined4 local_30;\n  int local_2c;\n  \n  puVar2 = PTR___stack_chk_guard_000564b4;\n  puVar1 = PTR_localeinfo_00056174;\n  pbVar7 = (byte *)*param_1;\n  local_2c = *(int *)PTR___stack_chk_guard_000564b4;\n  iVar3 = (int)param_2 - (int)pbVar7;\n  if (param_2 <= pbVar7) goto LAB_000219c0;\n  if (PTR_localeinfo_00056174[1] == '\0') {\n    local_34 = 0;\n    local_30 = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    pbVar5 = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }\n  }\n  else {\n    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    pbVar8 = param_2 + -uVar4;\n    local_34 = 0;\n    local_30 = 0;\n    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];\n    if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }\n    pbVar5 = param_2;\n    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }\n  }\nLAB_000219b4:\n  *param_1 = pbVar5;\n  if (pbVar5 == param_2) goto LAB_00021ad0;\n  iVar3 = (int)param_2 - (int)pbVar7;\nLAB_000219c0:\n  while (local_2c != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    iVar3 = 0;\n  }\n  return iVar3;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined *puVar2;" (type_identifier "undefined") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "byte *pbVar5;" (type_identifier "byte") (pointer_declarator "*pbVar5" (* "*") (identifier "pbVar5")) (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "byte *pbVar7;" (type_identifier "byte") (pointer_declarator "*pbVar7" (* "*") (identifier "pbVar7")) (; ";")) (declaration "byte *pbVar8;" (type_identifier "byte") (pointer_declarator "*pbVar8" (* "*") (identifier "pbVar8")) (; ";")) (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 "puVar2 = PTR___stack_chk_guard_000564b4;" (assignment_expression "puVar2 = PTR___stack_chk_guard_000564b4" (identifier "puVar2") (= "=") (identifier "PTR___stack_chk_guard_000564b4")) (; ";")) (expression_statement "puVar1 = PTR_localeinfo_00056174;" (assignment_expression "puVar1 = PTR_localeinfo_00056174" (identifier "puVar1") (= "=") (identifier "PTR_localeinfo_00056174")) (; ";")) (expression_statement "pbVar7 = (byte *)*param_1;" (assignment_expression "pbVar7 = (byte *)*param_1" (identifier "pbVar7") (= "=") (cast_expression "(byte *)*param_1" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "local_2c = *(int *)PTR___stack_chk_guard_000564b4;" (assignment_expression "local_2c = *(int *)PTR___stack_chk_guard_000564b4" (identifier "local_2c") (= "=") (pointer_expression "*(int *)PTR___stack_chk_guard_000564b4" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_000564b4" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_000564b4")))) (; ";")) (expression_statement "iVar3 = (int)param_2 - (int)pbVar7;" (assignment_expression "iVar3 = (int)param_2 - (int)pbVar7" (identifier "iVar3") (= "=") (binary_expression "(int)param_2 - (int)pbVar7" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (- "-") (cast_expression "(int)pbVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar7")))) (; ";")) (if_statement "if (param_2 <= pbVar7) goto LAB_000219c0;" (if "if") (parenthesized_expression "(param_2 <= pbVar7)" (( "(") (binary_expression "param_2 <= pbVar7" (identifier "param_2") (<= "<=") (identifier "pbVar7")) () ")")) (goto_statement "goto LAB_000219c0;" (goto "goto") (statement_identifier "LAB_000219c0") (; ";"))) (if_statement "if (PTR_localeinfo_00056174[1] == '\0') {\n    local_34 = 0;\n    local_30 = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    pbVar5 = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }\n  }\n  else {\n    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    pbVar8 = param_2 + -uVar4;\n    local_34 = 0;\n    local_30 = 0;\n    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];\n    if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }\n    pbVar5 = param_2;\n    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }\n  }" (if "if") (parenthesized_expression "(PTR_localeinfo_00056174[1] == '\0')" (( "(") (binary_expression "PTR_localeinfo_00056174[1] == '\0'" (subscript_expression "PTR_localeinfo_00056174[1]" (identifier "PTR_localeinfo_00056174") ([ "[") (number_literal "1") (] "]")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    local_34 = 0;\n    local_30 = 0;\n    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];\n    pbVar5 = pbVar7;\n    if (uVar4 == 0xfffffffe) goto LAB_00021980;\nLAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;\n    while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }\n  }" ({ "{") (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")) (; ";")) (expression_statement "uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];" (assignment_expression "uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2]" (identifier "uVar4") (= "=") (cast_expression "(uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (cast_expression "(char)PTR_localeinfo_00056174[*pbVar7 + 2]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "PTR_localeinfo_00056174[*pbVar7 + 2]" (identifier "PTR_localeinfo_00056174") ([ "[") (binary_expression "*pbVar7 + 2" (pointer_expression "*pbVar7" (* "*") (identifier "pbVar7")) (+ "+") (number_literal "2")) (] "]"))))) (; ";")) (expression_statement "pbVar5 = pbVar7;" (assignment_expression "pbVar5 = pbVar7" (identifier "pbVar5") (= "=") (identifier "pbVar7")) (; ";")) (if_statement "if (uVar4 == 0xfffffffe) goto LAB_00021980;" (if "if") (parenthesized_expression "(uVar4 == 0xfffffffe)" (( "(") (binary_expression "uVar4 == 0xfffffffe" (identifier "uVar4") (== "==") (number_literal "0xfffffffe")) () ")")) (goto_statement "goto LAB_00021980;" (goto "goto") (statement_identifier "LAB_00021980") (; ";"))) (labeled_statement "LAB_00021950:\n    if (0xfffffffd < uVar4) goto LAB_000219a0;" (statement_identifier "LAB_00021950") (: ":") (if_statement "if (0xfffffffd < uVar4) goto LAB_000219a0;" (if "if") (parenthesized_expression "(0xfffffffd < uVar4)" (( "(") (binary_expression "0xfffffffd < uVar4" (number_literal "0xfffffffd") (< "<") (identifier "uVar4")) () ")")) (goto_statement "goto LAB_000219a0;" (goto "goto") (statement_identifier "LAB_000219a0") (; ";")))) (while_statement "while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }" (while "while") (parenthesized_expression "(pbVar5 = pbVar7 + uVar4, pbVar5 < param_2)" (( "(") (comma_expression "pbVar5 = pbVar7 + uVar4, pbVar5 < param_2" (assignment_expression "pbVar5 = pbVar7 + uVar4" (identifier "pbVar5") (= "=") (binary_expression "pbVar7 + uVar4" (identifier "pbVar7") (+ "+") (identifier "uVar4"))) (, ",") (binary_expression "pbVar5 < param_2" (identifier "pbVar5") (< "<") (identifier "param_2"))) () ")")) (compound_statement "{\n      while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }\n    }" ({ "{") (while_statement "while( true ) {\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];\n        pbVar7 = pbVar5;\n        if (uVar4 != 0xfffffffe) goto LAB_00021950;\nLAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);\n        pbVar7 = pbVar5;\n        if (uVar4 < 0xfffffffe) break;\nLAB_000219a0:\n        pbVar5 = pbVar7 + 1;\n        local_34 = 0;\n        local_30 = 0;\n        if (param_2 <= pbVar5) goto LAB_000219b4;\n      }" ({ "{") (expression_statement "uVar4 = (uint)(char)puVar1[*pbVar5 + 2];" (assignment_expression "uVar4 = (uint)(char)puVar1[*pbVar5 + 2]" (identifier "uVar4") (= "=") (cast_expression "(uint)(char)puVar1[*pbVar5 + 2]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (cast_expression "(char)puVar1[*pbVar5 + 2]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "puVar1[*pbVar5 + 2]" (identifier "puVar1") ([ "[") (binary_expression "*pbVar5 + 2" (pointer_expression "*pbVar5" (* "*") (identifier "pbVar5")) (+ "+") (number_literal "2")) (] "]"))))) (; ";")) (expression_statement "pbVar7 = pbVar5;" (assignment_expression "pbVar7 = pbVar5" (identifier "pbVar7") (= "=") (identifier "pbVar5")) (; ";")) (if_statement "if (uVar4 != 0xfffffffe) goto LAB_00021950;" (if "if") (parenthesized_expression "(uVar4 != 0xfffffffe)" (( "(") (binary_expression "uVar4 != 0xfffffffe" (identifier "uVar4") (!= "!=") (number_literal "0xfffffffe")) () ")")) (goto_statement "goto LAB_00021950;" (goto "goto") (statement_identifier "LAB_00021950") (; ";"))) (labeled_statement "LAB_00021980:\n        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);" (statement_identifier "LAB_00021980") (: ":") (expression_statement "uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);" (assignment_expression "uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34)" (identifier "uVar4") (= "=") (call_expression "rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34)" (identifier "rpl_mbrlen") (argument_list "(pbVar5,(int)param_3 - (int)pbVar5,&local_34)" (( "(") (identifier "pbVar5") (, ",") (binary_expression "(int)param_3 - (int)pbVar5" (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3")) (- "-") (cast_expression "(int)pbVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar5"))) (, ",") (pointer_expression "&local_34" (& "&") (identifier "local_34")) () ")")))) (; ";"))) (expression_statement "pbVar7 = pbVar5;" (assignment_expression "pbVar7 = pbVar5" (identifier "pbVar7") (= "=") (identifier "pbVar5")) (; ";")) (if_statement "if (uVar4 < 0xfffffffe) break;" (if "if") (parenthesized_expression "(uVar4 < 0xfffffffe)" (( "(") (binary_expression "uVar4 < 0xfffffffe" (identifier "uVar4") (< "<") (number_literal "0xfffffffe")) () ")")) (break_statement "break;" (break "break") (; ";"))) (labeled_statement "LAB_000219a0:\n        pbVar5 = pbVar7 + 1;" (statement_identifier "LAB_000219a0") (: ":") (expression_statement "pbVar5 = pbVar7 + 1;" (assignment_expression "pbVar5 = pbVar7 + 1" (identifier "pbVar5") (= "=") (binary_expression "pbVar7 + 1" (identifier "pbVar7") (+ "+") (number_literal "1"))) (; ";"))) (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")) (; ";")) (if_statement "if (param_2 <= pbVar5) goto LAB_000219b4;" (if "if") (parenthesized_expression "(param_2 <= pbVar5)" (( "(") (binary_expression "param_2 <= pbVar5" (identifier "param_2") (<= "<=") (identifier "pbVar5")) () ")")) (goto_statement "goto LAB_000219b4;" (goto "goto") (statement_identifier "LAB_000219b4") (; ";"))) (} "}"))) (} "}"))) (} "}")) (else_clause "else {\n    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    pbVar8 = param_2 + -uVar4;\n    local_34 = 0;\n    local_30 = 0;\n    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];\n    if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }\n    pbVar5 = param_2;\n    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }\n  }" (else "else") (compound_statement "{\n    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }\n    uVar4 = 1;\n    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }\n    pbVar8 = param_2 + -uVar4;\n    local_34 = 0;\n    local_30 = 0;\n    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];\n    if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }\n    pbVar5 = param_2;\n    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }\n  }" ({ "{") (if_statement "if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }" (if "if") (parenthesized_expression "((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80))" (( "(") (binary_expression "(param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)" (parenthesized_expression "(param_3 <= param_2)" (( "(") (binary_expression "param_3 <= param_2" (identifier "param_3") (<= "<=") (identifier "param_2")) () ")")) (|| "||") (parenthesized_expression "(((int)(char)*param_2 & 0xc0U) != 0x80)" (( "(") (binary_expression "((int)(char)*param_2 & 0xc0U) != 0x80" (parenthesized_expression "((int)(char)*param_2 & 0xc0U)" (( "(") (binary_expression "(int)(char)*param_2 & 0xc0U" (cast_expression "(int)(char)*param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(char)*param_2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (& "&") (number_literal "0xc0U")) () ")")) (!= "!=") (number_literal "0x80")) () ")"))) () ")")) (compound_statement "{\nLAB_00021a4c:\n      iVar3 = 0;\n      *param_1 = param_2;\n      goto LAB_000219c0;\n    }" ({ "{") (labeled_statement "LAB_00021a4c:\n      iVar3 = 0;" (statement_identifier "LAB_00021a4c") (: ":") (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";"))) (expression_statement "*param_1 = param_2;" (assignment_expression "*param_1 = param_2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "param_2")) (; ";")) (goto_statement "goto LAB_000219c0;" (goto "goto") (statement_identifier "LAB_000219c0") (; ";")) (} "}"))) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" (identifier "uVar4") (= "=") (number_literal "1")) (; ";")) (if_statement "if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }" (if "if") (parenthesized_expression "(((int)(char)param_2[-1] & 0xc0U) == 0x80)" (( "(") (binary_expression "((int)(char)param_2[-1] & 0xc0U) == 0x80" (parenthesized_expression "((int)(char)param_2[-1] & 0xc0U)" (( "(") (binary_expression "(int)(char)param_2[-1] & 0xc0U" (cast_expression "(int)(char)param_2[-1]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(char)param_2[-1]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "param_2[-1]" (identifier "param_2") ([ "[") (number_literal "-1") (] "]")))) (& "&") (number_literal "0xc0U")) () ")")) (== "==") (number_literal "0x80")) () ")")) (compound_statement "{\n      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }\n    }" ({ "{") (if_statement "if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }\n      else {\n        uVar4 = 2;\n      }" (if "if") (parenthesized_expression "(((int)(char)param_2[-2] & 0xc0U) == 0x80)" (( "(") (binary_expression "((int)(char)param_2[-2] & 0xc0U) == 0x80" (parenthesized_expression "((int)(char)param_2[-2] & 0xc0U)" (( "(") (binary_expression "(int)(char)param_2[-2] & 0xc0U" (cast_expression "(int)(char)param_2[-2]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(char)param_2[-2]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "param_2[-2]" (identifier "param_2") ([ "[") (number_literal "-2") (] "]")))) (& "&") (number_literal "0xc0U")) () ")")) (== "==") (number_literal "0x80")) () ")")) (compound_statement "{\n        uVar4 = 3;\n        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;\n      }" ({ "{") (expression_statement "uVar4 = 3;" (assignment_expression "uVar4 = 3" (identifier "uVar4") (= "=") (number_literal "3")) (; ";")) (if_statement "if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;" (if "if") (parenthesized_expression "(((int)(char)param_2[-3] & 0xc0U) == 0x80)" (( "(") (binary_expression "((int)(char)param_2[-3] & 0xc0U) == 0x80" (parenthesized_expression "((int)(char)param_2[-3] & 0xc0U)" (( "(") (binary_expression "(int)(char)param_2[-3] & 0xc0U" (cast_expression "(int)(char)param_2[-3]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(char)param_2[-3]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "param_2[-3]" (identifier "param_2") ([ "[") (number_literal "-3") (] "]")))) (& "&") (number_literal "0xc0U")) () ")")) (== "==") (number_literal "0x80")) () ")")) (goto_statement "goto LAB_00021a4c;" (goto "goto") (statement_identifier "LAB_00021a4c") (; ";"))) (} "}")) (else_clause "else {\n        uVar4 = 2;\n      }" (else "else") (compound_statement "{\n        uVar4 = 2;\n      }" ({ "{") (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" (identifier "uVar4") (= "=") (number_literal "2")) (; ";")) (} "}")))) (} "}"))) (expression_statement "pbVar8 = param_2 + -uVar4;" (assignment_expression "pbVar8 = param_2 + -uVar4" (identifier "pbVar8") (= "=") (binary_expression "param_2 + -uVar4" (identifier "param_2") (+ "+") (unary_expression "-uVar4" (- "-") (identifier "uVar4")))) (; ";")) (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")) (; ";")) (expression_statement "uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];" (assignment_expression "uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2]" (identifier "uVar6") (= "=") (cast_expression "(uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (cast_expression "(char)PTR_localeinfo_00056174[*pbVar8 + 2]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "PTR_localeinfo_00056174[*pbVar8 + 2]" (identifier "PTR_localeinfo_00056174") ([ "[") (binary_expression "*pbVar8 + 2" (pointer_expression "*pbVar8" (* "*") (identifier "pbVar8")) (+ "+") (number_literal "2")) (] "]"))))) (; ";")) (if_statement "if (uVar6 == 0xfffffffe) {\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }" (if "if") (parenthesized_expression "(uVar6 == 0xfffffffe)" (( "(") (binary_expression "uVar6 == 0xfffffffe" (identifier "uVar6") (== "==") (number_literal "0xfffffffe")) () ")")) (compound_statement "{\n      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);\n    }" ({ "{") (expression_statement "uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);" (assignment_expression "uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34)" (identifier "uVar6") (= "=") (call_expression "rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34)" (identifier "rpl_mbrlen") (argument_list "(pbVar8,(int)param_3 - (int)pbVar8,&local_34)" (( "(") (identifier "pbVar8") (, ",") (binary_expression "(int)param_3 - (int)pbVar8" (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3")) (- "-") (cast_expression "(int)pbVar8" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar8"))) (, ",") (pointer_expression "&local_34" (& "&") (identifier "local_34")) () ")")))) (; ";")) (} "}"))) (expression_statement "pbVar5 = param_2;" (assignment_expression "pbVar5 = param_2" (identifier "pbVar5") (= "=") (identifier "param_2")) (; ";")) (if_statement "if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }" (if "if") (parenthesized_expression "((uVar4 < uVar6) && (uVar6 < 0xfffffffe))" (( "(") (binary_expression "(uVar4 < uVar6) && (uVar6 < 0xfffffffe)" (parenthesized_expression "(uVar4 < uVar6)" (( "(") (binary_expression "uVar4 < uVar6" (identifier "uVar4") (< "<") (identifier "uVar6")) () ")")) (&& "&&") (parenthesized_expression "(uVar6 < 0xfffffffe)" (( "(") (binary_expression "uVar6 < 0xfffffffe" (identifier "uVar6") (< "<") (number_literal "0xfffffffe")) () ")"))) () ")")) (compound_statement "{\n      pbVar5 = pbVar8 + uVar6;\n      pbVar7 = pbVar8;\n    }" ({ "{") (expression_statement "pbVar5 = pbVar8 + uVar6;" (assignment_expression "pbVar5 = pbVar8 + uVar6" (identifier "pbVar5") (= "=") (binary_expression "pbVar8 + uVar6" (identifier "pbVar8") (+ "+") (identifier "uVar6"))) (; ";")) (expression_statement "pbVar7 = pbVar8;" (assignment_expression "pbVar7 = pbVar8" (identifier "pbVar7") (= "=") (identifier "pbVar8")) (; ";")) (} "}"))) (} "}")))) (labeled_statement "LAB_000219b4:\n  *param_1 = pbVar5;" (statement_identifier "LAB_000219b4") (: ":") (expression_statement "*param_1 = pbVar5;" (assignment_expression "*param_1 = pbVar5" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "pbVar5")) (; ";"))) (if_statement "if (pbVar5 == param_2) goto LAB_00021ad0;" (if "if") (parenthesized_expression "(pbVar5 == param_2)" (( "(") (binary_expression "pbVar5 == param_2" (identifier "pbVar5") (== "==") (identifier "param_2")) () ")")) (goto_statement "goto LAB_00021ad0;" (goto "goto") (statement_identifier "LAB_00021ad0") (; ";"))) (expression_statement "iVar3 = (int)param_2 - (int)pbVar7;" (assignment_expression "iVar3 = (int)param_2 - (int)pbVar7" (identifier "iVar3") (= "=") (binary_expression "(int)param_2 - (int)pbVar7" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (- "-") (cast_expression "(int)pbVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar7")))) (; ";")) (labeled_statement "LAB_000219c0:\n  while (local_2c != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    iVar3 = 0;\n  }" (statement_identifier "LAB_000219c0") (: ":") (while_statement "while (local_2c != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    iVar3 = 0;\n  }" (while "while") (parenthesized_expression "(local_2c != *(int *)puVar2)" (( "(") (binary_expression "local_2c != *(int *)puVar2" (identifier "local_2c") (!= "!=") (pointer_expression "*(int *)puVar2" (* "*") (cast_expression "(int *)puVar2" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar2")))) () ")")) (compound_statement "{\n    (*(code *)PTR___stack_chk_fail_00056494)();\nLAB_00021ad0:\n    iVar3 = 0;\n  }" ({ "{") (expression_statement "(*(code *)PTR___stack_chk_fail_00056494)();" (call_expression "(*(code *)PTR___stack_chk_fail_00056494)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_00056494)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_00056494" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_00056494" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_00056494"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (labeled_statement "LAB_00021ad0:\n    iVar3 = 0;" (statement_identifier "LAB_00021ad0") (: ":") (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";"))) (} "}")))) (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}")))

ptrdiff_t function_1(char **mb_start,char *var_1,char *var_6)

{
  type_1 *puVar1;
  type_1 *puVar2;
  ptrdiff_t pVar3;
  type_2 var_3;
  type_3 *var_4;
  int var_9;
  size_t var_7;
  type_3 *var_2;
  type_3 *var_8;
  type_4 mbs;
  
  puVar2 = PTR___stack_chk_guard_000564b4;
  puVar1 = PTR_localeinfo_00056174;
  var_2 = (type_3 *)*mb_start;
  var_9 = *(int *)PTR___stack_chk_guard_000564b4;
  pVar3 = (int)var_1 - (int)var_2;
  if (var_1 <= var_2) goto LAB_000219c0;
  if (PTR_localeinfo_00056174[1] == '\0') {
    mbs.__count = 0;
    mbs.__value.__wch = 0;
    var_3 = (type_2)(char)PTR_localeinfo_00056174[*var_2 + 2];
    var_4 = var_2;
    if (var_3 == 0xfffffffe) goto LAB_00021980;
LAB_00021950:
    if (0xfffffffd < var_3) goto LAB_000219a0;
    while (var_4 = var_2 + var_3, var_4 < var_1) {
      while( true ) {
        var_3 = (type_2)(char)puVar1[*var_4 + 2];
        var_2 = var_4;
        if (var_3 != 0xfffffffe) goto LAB_00021950;
LAB_00021980:
        var_3 = var_5((char *)var_4,(int)var_6 - (int)var_4,&mbs);
        var_2 = var_4;
        if (var_3 < 0xfffffffe) break;
LAB_000219a0:
        var_4 = var_2 + 1;
        mbs.__count = 0;
        mbs.__value.__wch = 0;
        if (var_1 <= var_4) goto LAB_000219b4;
      }
    }
  }
  else {
    if ((var_6 <= var_1) || (((int)*var_1 & 0xc0U) != 0x80)) {
LAB_00021a4c:
      pVar3 = 0;
      *mb_start = var_1;
      goto LAB_000219c0;
    }
    var_3 = 1;
    if (((int)var_1[-1] & 0xc0U) == 0x80) {
      if (((int)var_1[-2] & 0xc0U) == 0x80) {
        var_3 = 3;
        if (((int)var_1[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;
      }
      else {
        var_3 = 2;
      }
    }
    var_8 = (type_3 *)(var_1 + -var_3);
    mbs.__count = 0;
    mbs.__value.__wch = 0;
    var_7 = (size_t)(char)PTR_localeinfo_00056174[*var_8 + 2];
    if (var_7 == 0xfffffffe) {
      var_7 = var_5((char *)var_8,(int)var_6 - (int)var_8,&mbs);
    }
    var_4 = (type_3 *)var_1;
    if ((var_3 < var_7) && (var_7 < 0xfffffffe)) {
      var_4 = var_8 + var_7;
      var_2 = var_8;
    }
  }
LAB_000219b4:
  *mb_start = (char *)var_4;
  if (var_4 == (type_3 *)var_1) goto LAB_00021ad0;
  pVar3 = (int)var_1 - (int)var_2;
LAB_000219c0:
  while (var_9 != *(int *)puVar2) {
    (*(type_5 *)PTR___stack_chk_fail_00056494)();
LAB_00021ad0:
    pVar3 = 0;
  }
  return pVar3;
}


(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: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (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: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (subscript_expression argument: (identifier) index: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (goto_statement label: (statement_identifier)))) (while_statement condition: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))) right: (binary_expression left: (identifier) right: (identifier)))) body: (compound_statement (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (subscript_expression argument: (identifier) index: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (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))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_statement)) (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: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (goto_statement label: (statement_identifier)))))))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (pointer_expression argument: (identifier)))) right: (number_literal))) right: (number_literal))))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (subscript_expression argument: (identifier) index: (number_literal)))) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (subscript_expression argument: (identifier) index: (number_literal)))) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (subscript_expression argument: (identifier) index: (number_literal)))) right: (number_literal))) right: (number_literal))) consequence: (goto_statement label: (statement_identifier)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (unary_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (subscript_expression argument: (identifier) index: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (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)))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (labeled_statement label: (statement_identifier) (while_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))))) body: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (number_literal))))))) (return_statement (identifier)))))

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

{
  undefined *puVar1;
  undefined *puVar2;
  int iVar3;
  uint uVar4;
  byte *pbVar5;
  uint uVar6;
  byte *pbVar7;
  byte *pbVar8;
  undefined4 local_34;
  undefined4 local_30;
  int local_2c;
  
  puVar2 = PTR___stack_chk_guard_000564b4;
  puVar1 = PTR_localeinfo_00056174;
  pbVar7 = (byte *)*param_1;
  local_2c = *(int *)PTR___stack_chk_guard_000564b4;
  iVar3 = (int)param_2 - (int)pbVar7;
  if (param_2 <= pbVar7) goto LAB_000219c0;
  if (PTR_localeinfo_00056174[1] == '\0') {
    local_34 = 0;
    local_30 = 0;
    uVar4 = (uint)(char)PTR_localeinfo_00056174[*pbVar7 + 2];
    pbVar5 = pbVar7;
    if (uVar4 == 0xfffffffe) goto LAB_00021980;
LAB_00021950:
    if (0xfffffffd < uVar4) goto LAB_000219a0;
    while (pbVar5 = pbVar7 + uVar4, pbVar5 < param_2) {
      while( true ) {
        uVar4 = (uint)(char)puVar1[*pbVar5 + 2];
        pbVar7 = pbVar5;
        if (uVar4 != 0xfffffffe) goto LAB_00021950;
LAB_00021980:
        uVar4 = rpl_mbrlen(pbVar5,(int)param_3 - (int)pbVar5,&local_34);
        pbVar7 = pbVar5;
        if (uVar4 < 0xfffffffe) break;
LAB_000219a0:
        pbVar5 = pbVar7 + 1;
        local_34 = 0;
        local_30 = 0;
        if (param_2 <= pbVar5) goto LAB_000219b4;
      }
    }
  }
  else {
    if ((param_3 <= param_2) || (((int)(char)*param_2 & 0xc0U) != 0x80)) {
LAB_00021a4c:
      iVar3 = 0;
      *param_1 = param_2;
      goto LAB_000219c0;
    }
    uVar4 = 1;
    if (((int)(char)param_2[-1] & 0xc0U) == 0x80) {
      if (((int)(char)param_2[-2] & 0xc0U) == 0x80) {
        uVar4 = 3;
        if (((int)(char)param_2[-3] & 0xc0U) == 0x80) goto LAB_00021a4c;
      }
      else {
        uVar4 = 2;
      }
    }
    pbVar8 = param_2 + -uVar4;
    local_34 = 0;
    local_30 = 0;
    uVar6 = (uint)(char)PTR_localeinfo_00056174[*pbVar8 + 2];
    if (uVar6 == 0xfffffffe) {
      uVar6 = rpl_mbrlen(pbVar8,(int)param_3 - (int)pbVar8,&local_34);
    }
    pbVar5 = param_2;
    if ((uVar4 < uVar6) && (uVar6 < 0xfffffffe)) {
      pbVar5 = pbVar8 + uVar6;
      pbVar7 = pbVar8;
    }
  }
LAB_000219b4:
  *param_1 = pbVar5;
  if (pbVar5 == param_2) goto LAB_00021ad0;
  iVar3 = (int)param_2 - (int)pbVar7;
LAB_000219c0:
  while (local_2c != *(int *)puVar2) {
    (*(code *)PTR___stack_chk_fail_00056494)();
LAB_00021ad0:
    iVar3 = 0;
  }
  return iVar3;
}

