
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

size_t __regparm3
quote_name_buf(char **inbuf,size_t bufsize,char *name,quoting_options *options,
              int needs_general_quoting,size_t *width,_Bool *pad)

{
  byte *pbVar1;
  byte bVar2;
  int iVar3;
  bool bVar4;
  quoting_style qVar5;
  size_t sVar6;
  size_t sVar7;
  ushort **ppuVar8;
  int iVar9;
  byte *pbVar10;
  byte *pbVar11;
  byte *pbVar12;
  byte *pbVar13;
  int in_GS_OFFSET;
  byte bVar14;
  byte *local_54;
  size_t local_4c;
  byte *local_44;
  bool local_35;
  wchar_t wc;
  mbstate_t mbstate;
  byte *s;
  
  bVar14 = 0;
  local_44 = (byte *)*inbuf;
  iVar3 = *(int *)(in_GS_OFFSET + 0x14);
  qVar5 = get_quoting_style((quoting_options *)name);
  if ((qVar5 < shell_escape_quoting_style & qmark_funny_chars) == 0) {
    bVar4 = false;
    if (options == (quoting_options *)0x0) {
      sVar6 = strlen((char *)bufsize);
      local_35 = false;
      local_44 = (byte *)bufsize;
    }
    else {
LAB_00015e76:
      sVar6 = quotearg_buffer((char *)local_44,0x2000,(char *)bufsize,0xffffffff,
                              (quoting_options *)name);
      if (0x1fff < sVar6) {
        local_44 = (byte *)xmalloc(sVar6 + 1);
        quotearg_buffer((char *)local_44,sVar6 + 1,(char *)bufsize,0xffffffff,
                        (quoting_options *)name);
      }
      local_35 = true;
      if (*(byte *)bufsize == *local_44) {
        sVar7 = strlen((char *)bufsize);
        local_35 = sVar6 != sVar7;
      }
      if (bVar4) goto LAB_00015fbc;
    }
    if (needs_general_quoting == 0) {
      if (align_variable_outer_quotes == false) {
        *(undefined1 *)width = 0;
        goto LAB_0001603e;
      }
LAB_00016015:
      bVar14 = (cwd_some_quoted ^ 1U | local_35) ^ 1;
      goto LAB_00016026;
    }
    sVar7 = __ctype_get_mb_cur_max();
    if (sVar7 < 2) {
      if (local_44 < local_44 + sVar6) {
        ppuVar8 = __ctype_b_loc();
        local_4c = 0;
        pbVar12 = local_44;
        do {
          local_4c = (local_4c + 1) - (uint)(((*ppuVar8)[*pbVar12] & 0x4000) == 0);
          pbVar12 = pbVar12 + 1;
        } while (local_44 + sVar6 != pbVar12);
      }
      else {
        local_4c = 0;
      }
    }
    else {
      local_4c = mbsnwidth((char *)local_44,sVar6,0);
    }
    if (align_variable_outer_quotes != false) goto LAB_00016015;
    *(undefined1 *)width = 0;
  }
  else {
    if (options != (quoting_options *)0x0) {
      bVar4 = true;
      goto LAB_00015e76;
    }
    sVar6 = strlen((char *)bufsize);
    if (0x1fff < sVar6) {
      local_44 = (byte *)xmalloc(sVar6 + 1);
    }
    memcpy(local_44,(void *)bufsize,sVar6 + 1);
    local_35 = false;
LAB_00015fbc:
    local_4c = sVar6;
    sVar7 = __ctype_get_mb_cur_max();
    pbVar12 = local_44 + local_4c;
    if (sVar7 < 2) {
      sVar6 = local_4c;
      if (local_44 < pbVar12) {
        ppuVar8 = __ctype_b_loc();
        pbVar10 = local_44;
        do {
          if ((*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40) == 0) {
            *pbVar10 = 0x3f;
          }
          pbVar10 = pbVar10 + 1;
        } while (pbVar10 != pbVar12);
      }
    }
    else if (local_44 < pbVar12) {
      local_4c = 0;
      local_54 = local_44;
      pbVar10 = local_44;
      do {
        bVar2 = *pbVar10;
        if ((char)bVar2 < '@') {
          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;
LAB_0001609c:
          local_4c = local_4c + 1;
          pbVar10 = pbVar10 + 1;
          *local_54 = bVar2;
          local_54 = local_54 + 1;
        }
        else {
          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))
          goto LAB_0001609c;
LAB_000160d2:
          mbstate.__count = 0;
          mbstate.__value.__wch = 0;
          s = pbVar10;
          do {
            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);
            pbVar1 = local_54 + 1;
            if (sVar6 == 0xffffffff) {
              pbVar10 = s + 1;
              *local_54 = 0x3f;
LAB_000161e7:
              local_4c = local_4c + 1;
              local_54 = pbVar1;
              break;
            }
            if (sVar6 == 0xfffffffe) {
              *local_54 = 0x3f;
              pbVar10 = pbVar12;
              goto LAB_000161e7;
            }
            if (sVar6 == 0) {
              iVar9 = wcwidth(wc);
              pbVar10 = s + 1;
              if (iVar9 < 0) goto LAB_000160ff;
              *local_54 = *s;
              pbVar11 = pbVar10;
              local_54 = pbVar1;
LAB_00016181:
              local_4c = local_4c + iVar9;
              pbVar10 = pbVar11;
            }
            else {
              iVar9 = wcwidth(wc);
              pbVar10 = s + sVar6;
              pbVar13 = local_54;
              if (-1 < iVar9) {
                do {
                  pbVar11 = s + (uint)bVar14 * -2 + 1;
                  *pbVar13 = *s;
                  s = pbVar11;
                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;
                } while (pbVar11 != pbVar10);
                local_54 = local_54 + sVar6;
                goto LAB_00016181;
              }
LAB_000160ff:
              local_4c = local_4c + 1;
              *local_54 = 0x3f;
              local_54 = pbVar1;
            }
            iVar9 = mbsinit((mbstate_t *)&mbstate);
            s = pbVar10;
          } while (iVar9 == 0);
        }
      } while (pbVar10 < pbVar12);
      sVar6 = (int)local_54 - (int)local_44;
    }
    else {
      local_4c = 0;
      sVar6 = 0;
    }
    bVar14 = align_variable_outer_quotes;
    if (align_variable_outer_quotes != false) goto LAB_00016015;
LAB_00016026:
    *(byte *)width = bVar14;
    if (needs_general_quoting == 0) goto LAB_0001603e;
  }
  *(size_t *)needs_general_quoting = local_4c;
LAB_0001603e:
  *inbuf = (char *)local_44;
  if (iVar3 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return sVar6;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

uint __regparm3
FUN_00015e10(undefined4 *param_1,byte *param_2,undefined4 param_3,int param_4,uint *param_5,
            byte *param_6)

{
  byte *pbVar1;
  byte bVar2;
  bool bVar3;
  uint uVar4;
  size_t sVar5;
  ushort **ppuVar6;
  int iVar7;
  int iVar8;
  byte *pbVar9;
  byte *pbVar10;
  byte *pbVar12;
  byte *pbVar13;
  int in_GS_OFFSET;
  byte bVar14;
  byte *local_54;
  uint local_4c;
  byte *local_44;
  bool local_35;
  wchar_t local_2c;
  mbstate_t local_28;
  int local_20;
  undefined4 uStack_14;
  byte *pbVar11;
  
  bVar14 = 0;
  uStack_14 = 0x15e1d;
  local_44 = (byte *)*param_1;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  uVar4 = FUN_00022de0(param_3);
  if ((uVar4 < 3 & DAT_0003c2bc) == 0) {
    bVar3 = false;
    if (param_4 == 0) {
      uVar4 = strlen((char *)param_2);
      local_35 = false;
      local_44 = param_2;
    }
    else {
LAB_00015e76:
      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);
      if (0x1fff < uVar4) {
        local_44 = (byte *)FUN_00023f30(uVar4 + 1);
        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);
      }
      local_35 = true;
      if (*param_2 == *local_44) {
        sVar5 = strlen((char *)param_2);
        local_35 = uVar4 != sVar5;
      }
      if (bVar3) goto LAB_00015fbc;
    }
    if (param_5 == (uint *)0x0) {
      if (DAT_0003c354 == 0) {
        *param_6 = 0;
        goto LAB_0001603e;
      }
LAB_00016015:
      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;
      goto LAB_00016026;
    }
    sVar5 = __ctype_get_mb_cur_max();
    if (sVar5 < 2) {
      if (local_44 < local_44 + uVar4) {
        ppuVar6 = __ctype_b_loc();
        local_4c = 0;
        pbVar12 = local_44;
        do {
          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);
          pbVar12 = pbVar12 + 1;
        } while (local_44 + uVar4 != pbVar12);
      }
      else {
        local_4c = 0;
      }
    }
    else {
      local_4c = FUN_0001f960(local_44,uVar4,0);
    }
    if (DAT_0003c354 != 0) goto LAB_00016015;
    *param_6 = 0;
  }
  else {
    if (param_4 != 0) {
      bVar3 = true;
      goto LAB_00015e76;
    }
    uVar4 = strlen((char *)param_2);
    if (0x1fff < uVar4) {
      local_44 = (byte *)FUN_00023f30(uVar4 + 1);
    }
    memcpy(local_44,param_2,uVar4 + 1);
    local_35 = false;
LAB_00015fbc:
    local_4c = uVar4;
    sVar5 = __ctype_get_mb_cur_max();
    pbVar12 = local_44 + local_4c;
    if (sVar5 < 2) {
      uVar4 = local_4c;
      if (local_44 < pbVar12) {
        ppuVar6 = __ctype_b_loc();
        pbVar9 = local_44;
        do {
          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {
            *pbVar9 = 0x3f;
          }
          pbVar9 = pbVar9 + 1;
        } while (pbVar9 != pbVar12);
      }
    }
    else if (local_44 < pbVar12) {
      local_4c = 0;
      local_54 = local_44;
      pbVar9 = local_44;
      do {
        bVar2 = *pbVar9;
        if ((char)bVar2 < '@') {
          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;
LAB_0001609c:
          local_4c = local_4c + 1;
          pbVar9 = pbVar9 + 1;
          *local_54 = bVar2;
          local_54 = local_54 + 1;
        }
        else {
          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))
          goto LAB_0001609c;
LAB_000160d2:
          local_28.__count = 0;
          local_28.__value.__wch = 0;
          pbVar11 = pbVar9;
          do {
            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);
            pbVar1 = local_54 + 1;
            if (iVar7 == -1) {
              pbVar9 = pbVar11 + 1;
              *local_54 = 0x3f;
LAB_000161e7:
              local_4c = local_4c + 1;
              local_54 = pbVar1;
              break;
            }
            if (iVar7 == -2) {
              *local_54 = 0x3f;
              pbVar9 = pbVar12;
              goto LAB_000161e7;
            }
            if (iVar7 == 0) {
              iVar8 = wcwidth(local_2c);
              pbVar9 = pbVar11 + 1;
              if (iVar8 < 0) goto LAB_000160ff;
              *local_54 = *pbVar11;
              pbVar10 = pbVar9;
              local_54 = pbVar1;
LAB_00016181:
              local_4c = local_4c + iVar8;
              pbVar9 = pbVar10;
            }
            else {
              iVar8 = wcwidth(local_2c);
              pbVar9 = pbVar11 + iVar7;
              pbVar13 = local_54;
              if (-1 < iVar8) {
                do {
                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;
                  *pbVar13 = *pbVar11;
                  pbVar11 = pbVar10;
                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;
                } while (pbVar10 != pbVar9);
                local_54 = local_54 + iVar7;
                goto LAB_00016181;
              }
LAB_000160ff:
              local_4c = local_4c + 1;
              *local_54 = 0x3f;
              local_54 = pbVar1;
            }
            iVar7 = mbsinit(&local_28);
            pbVar11 = pbVar9;
          } while (iVar7 == 0);
        }
      } while (pbVar9 < pbVar12);
      uVar4 = (int)local_54 - (int)local_44;
    }
    else {
      local_4c = 0;
      uVar4 = 0;
    }
    bVar14 = DAT_0003c354;
    if (DAT_0003c354 != 0) goto LAB_00016015;
LAB_00016026:
    *param_6 = bVar14;
    if (param_5 == (uint *)0x0) goto LAB_0001603e;
  }
  *param_5 = local_4c;
LAB_0001603e:
  *param_1 = local_44;
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0002b190();
  }
  return uVar4;
}


PUSH EBP
PUSH EDI
MOV EDI,ECX
PUSH ESI
MOV ESI,EDX
PUSH EBX
CALL 0x00014250
ADD EBX,0x251e3
SUB ESP,0x58
MOV ECX,dword ptr [ESP + 0x70]
MOV EBP,dword ptr [ESP + 0x6c]
MOV dword ptr [ESP + 0x34],EAX
MOV EAX,dword ptr [EAX]
MOV dword ptr [ESP + 0x2c],ECX
MOV ECX,dword ptr [ESP + 0x74]
MOV dword ptr [ESP + 0x38],ECX
MOV ECX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x48],ECX
XOR ECX,ECX
MOV dword ptr [ESP + 0x24],EAX
PUSH EDI
CALL 0x00022de0
ADD ESP,0x10
CMP EAX,0x2
SETBE AL
AND AL,byte ptr [EBX + 0x12bc]
MOV byte ptr [ESP + 0x27],AL
JNZ 0x00015f80
XOR ECX,ECX
TEST EBP,EBP
JZ 0x00015ee0
MOV dword ptr [ESP + 0x8],ECX
SUB ESP,0xc
PUSH EDI
PUSH -0x1
PUSH ESI
PUSH 0x2000
PUSH dword ptr [ESP + 0x34]
CALL 0x00022f00
ADD ESP,0x20
MOV ECX,dword ptr [ESP + 0x8]
CMP EAX,0x1fff
MOV EBP,EAX
JA 0x00016217
MOV EAX,dword ptr [ESP + 0x18]
MOV byte ptr [ESP + 0x27],0x1
MOVZX EAX,byte ptr [EAX]
CMP byte ptr [ESI],AL
JNZ 0x00015ece
MOV dword ptr [ESP + 0x8],ECX
SUB ESP,0xc
PUSH ESI
CALL 0x00012420
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x8]
CMP EBP,EAX
SETNZ byte ptr [ESP + 0x27]
TEST ECX,ECX
JZ 0x00015ef2
MOV dword ptr [ESP + 0x10],EBP
JMP 0x00015fbc
SUB ESP,0xc
PUSH ESI
CALL 0x00012420
ADD ESP,0x10
MOV dword ptr [ESP + 0x18],ESI
MOV EBP,EAX
MOV EDX,dword ptr [ESP + 0x20]
TEST EDX,EDX
JZ 0x00015f60
CALL 0x000122c0
CMP EAX,0x1
JA 0x000161b8
MOV EAX,dword ptr [ESP + 0x18]
LEA ESI,[EAX + EBP*0x1]
CMP ESI,EAX
JBE 0x0001624c
CALL 0x00012750
XOR ECX,ECX
MOV EDI,dword ptr [EAX]
MOV EAX,dword ptr [ESP + 0x18]
LEA ESI,[ESI]
MOVZX EDX,byte ptr [EAX]
MOVZX EDX,word ptr [EDI + EDX*0x2]
AND DX,0x4000
CMP DX,0x1
SBB ECX,-0x1
ADD EAX,0x1
CMP ESI,EAX
JNZ 0x00015f28
MOV dword ptr [ESP + 0x10],ECX
CMP byte ptr [EBX + 0x1354],0x0
JNZ 0x00016015
MOV EAX,dword ptr [ESP + 0x2c]
MOV byte ptr [EAX],0x0
JMP 0x00016034
CMP byte ptr [EBX + 0x1354],0x0
JNZ 0x00016015
MOV EAX,dword ptr [ESP + 0x2c]
MOV byte ptr [EAX],0x0
JMP 0x0001603e
TEST EBP,EBP
JNZ 0x00016268
SUB ESP,0xc
PUSH ESI
CALL 0x00012420
ADD ESP,0x10
MOV dword ptr [ESP + 0x10],EAX
LEA EDI,[EAX + 0x1]
CMP EAX,0x1fff
JA 0x00016202
SUB ESP,0x4
PUSH EDI
PUSH ESI
PUSH dword ptr [ESP + 0x24]
CALL 0x00012140
ADD ESP,0x10
MOV byte ptr [ESP + 0x27],0x0
CALL 0x000122c0
MOV ECX,dword ptr [ESP + 0x18]
MOV EDI,dword ptr [ESP + 0x10]
ADD EDI,ECX
MOV dword ptr [ESP + 0x14],EDI
CMP EAX,0x1
JA 0x00016068
MOV EDI,dword ptr [ESP + 0x14]
MOV ESI,dword ptr [ESP + 0x18]
CMP EDI,ESI
JBE 0x00016006
CALL 0x00012750
MOV EDX,ESI
LEA ESI,[ESI]
NOP
MOVZX ESI,byte ptr [EDX]
MOV ECX,dword ptr [EAX]
TEST byte ptr [ECX + ESI*0x2 + 0x1],0x40
JNZ 0x00015fff
MOV byte ptr [EDX],0x3f
ADD EDX,0x1
CMP EDX,EDI
JNZ 0x00015ff0
MOV EBP,dword ptr [ESP + 0x10]
MOVZX EAX,byte ptr [EBX + 0x1354]
TEST AL,AL
JZ 0x00016026
MOVZX EAX,byte ptr [EBX + 0x1355]
XOR EAX,0x1
OR AL,byte ptr [ESP + 0x27]
XOR EAX,0x1
MOV EDI,dword ptr [ESP + 0x2c]
MOV byte ptr [EDI],AL
MOV EAX,dword ptr [ESP + 0x20]
TEST EAX,EAX
JZ 0x0001603e
MOV EAX,dword ptr [ESP + 0x20]
MOV ECX,dword ptr [ESP + 0x10]
MOV dword ptr [EAX],ECX
MOV EAX,dword ptr [ESP + 0x28]
MOV ECX,dword ptr [ESP + 0x18]
MOV dword ptr [EAX],ECX
MOV EAX,EBP
MOV EDI,dword ptr [ESP + 0x3c]
XOR EDI,dword ptr GS:[0x14]
JNZ 0x00016272
ADD ESP,0x4c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP EDI,ECX
JBE 0x00016259
LEA EAX,[ESP + 0x34]
MOV ESI,ECX
MOV dword ptr [ESP + 0x10],0x0
MOV dword ptr [ESP + 0xc],EAX
LEA EAX,[ESP + 0x30]
MOV dword ptr [ESP + 0x1c],EAX
MOV dword ptr [ESP + 0x8],ECX
JMP 0x000160bb
CMP AL,0x25
JGE 0x0001609c
LEA EDX,[EAX + -0x20]
CMP DL,0x3
JA 0x000160d2
MOV ECX,dword ptr [ESP + 0x8]
ADD dword ptr [ESP + 0x10],0x1
ADD ESI,0x1
MOV byte ptr [ECX],AL
LEA EAX,[ECX + 0x1]
MOV dword ptr [ESP + 0x8],EAX
CMP dword ptr [ESP + 0x14],ESI
JBE 0x000161a8
MOVZX EAX,byte ptr [ESI]
CMP AL,0x3f
JLE 0x00016090
CMP AL,0x41
JL 0x000160d2
CMP AL,0x5f
JLE 0x0001609c
LEA EDX,[EAX + -0x61]
CMP DL,0x1d
JBE 0x0001609c
MOV dword ptr [ESP + 0x34],0x0
MOV dword ptr [ESP + 0x38],0x0
JMP 0x00016124
SUB ESP,0xc
PUSH EAX
CALL 0x00012100
ADD ESP,0x10
LEA EDX,[ESI + EBP*0x1]
TEST EAX,EAX
JNS 0x00016190
MOV EAX,dword ptr [ESP + 0x8]
ADD dword ptr [ESP + 0x10],0x1
MOV ESI,EDX
MOV dword ptr [ESP + 0x8],EDI
MOV byte ptr [EAX],0x3f
SUB ESP,0xc
PUSH dword ptr [ESP + 0x18]
CALL 0x00012150
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x000160b1
PUSH dword ptr [ESP + 0xc]
MOV EAX,dword ptr [ESP + 0x18]
SUB EAX,ESI
PUSH EAX
PUSH ESI
PUSH dword ptr [ESP + 0x28]
CALL 0x00029110
MOV EBP,EAX
MOV EAX,dword ptr [ESP + 0x18]
ADD ESP,0x10
LEA EDI,[EAX + 0x1]
CMP EBP,-0x1
JZ 0x000161d8
CMP EBP,-0x2
JZ 0x000161f0
MOV EAX,dword ptr [ESP + 0x30]
TEST EBP,EBP
JNZ 0x000160e8
SUB ESP,0xc
PUSH EAX
CALL 0x00012100
LEA EDX,[ESI + 0x1]
ADD ESP,0x10
TEST EAX,EAX
JS 0x000160ff
MOVZX ECX,byte ptr [ESI]
MOV ESI,dword ptr [ESP + 0x8]
MOV dword ptr [ESP + 0x8],EDI
MOV byte ptr [ESI],CL
MOV ESI,EDX
ADD dword ptr [ESP + 0x10],EAX
JMP 0x00016111
MOV EDI,dword ptr [ESP + 0x8]
LEA ESI,[ESI]
MOVSB ES:EDI,ESI
CMP ESI,EDX
JNZ 0x00016198
ADD dword ptr [ESP + 0x8],EBP
JMP 0x00016181
MOV EBP,dword ptr [ESP + 0x8]
SUB EBP,dword ptr [ESP + 0x18]
JMP 0x0001600a
SUB ESP,0x4
PUSH 0x0
PUSH EBP
PUSH dword ptr [ESP + 0x24]
CALL 0x0001f960
MOV dword ptr [ESP + 0x20],EAX
ADD ESP,0x10
JMP 0x00015f46
MOV EAX,dword ptr [ESP + 0x8]
ADD dword ptr [ESP + 0x10],0x1
ADD ESI,0x1
MOV byte ptr [EAX],0x3f
MOV dword ptr [ESP + 0x8],EDI
JMP 0x000160b1
MOV EAX,dword ptr [ESP + 0x8]
ADD dword ptr [ESP + 0x10],0x1
MOV ESI,dword ptr [ESP + 0x14]
MOV byte ptr [EAX],0x3f
JMP 0x000161e7
SUB ESP,0xc
PUSH EDI
CALL 0x00023f30
MOV dword ptr [ESP + 0x28],EAX
ADD ESP,0x10
JMP 0x00015fa6
MOV dword ptr [ESP + 0xc],ECX
LEA EDX,[EAX + 0x1]
SUB ESP,0xc
PUSH EDX
MOV dword ptr [ESP + 0x18],EDX
CALL 0x00023f30
MOV dword ptr [ESP],EDI
MOV dword ptr [ESP + 0x28],EAX
PUSH -0x1
PUSH ESI
MOV EDX,dword ptr [ESP + 0x20]
PUSH EDX
PUSH EAX
CALL 0x00022f00
ADD ESP,0x20
MOV ECX,dword ptr [ESP + 0xc]
JMP 0x00015ea3
MOV dword ptr [ESP + 0x10],0x0
JMP 0x00015f46
XOR EBP,EBP
MOV dword ptr [ESP + 0x10],0x0
JMP 0x0001600a
MOV ECX,0x1
JMP 0x00015e76
CALL 0x0002b190
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint __regparm3\nFUN_00015e10(undefined4 *param_1,byte *param_2,undefined4 param_3,int param_4,uint *param_5,\n            byte *param_6)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  bool bVar3;\n  uint uVar4;\n  size_t sVar5;\n  ushort **ppuVar6;\n  int iVar7;\n  int iVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  byte *pbVar12;\n  byte *pbVar13;\n  int in_GS_OFFSET;\n  byte bVar14;\n  byte *local_54;\n  uint local_4c;\n  byte *local_44;\n  bool local_35;\n  wchar_t local_2c;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  byte *pbVar11;\n  \n  bVar14 = 0;\n  uStack_14 = 0x15e1d;\n  local_44 = (byte *)*param_1;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar4 = FUN_00022de0(param_3);\n  if ((uVar4 < 3 & DAT_0003c2bc) == 0) {\n    bVar3 = false;\n    if (param_4 == 0) {\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }\n    else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }\n    if (param_5 == (uint *)0x0) {\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar5 = __ctype_get_mb_cur_max();\n    if (sVar5 < 2) {\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }\n    if (DAT_0003c354 != 0) goto LAB_00016015;\n    *param_6 = 0;\n  }\n  else {\n    if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }\n    uVar4 = strlen((char *)param_2);\n    if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }\n    memcpy(local_44,param_2,uVar4 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = uVar4;\n    sVar5 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }\n    bVar14 = DAT_0003c354;\n    if (DAT_0003c354 != 0) goto LAB_00016015;\nLAB_00016026:\n    *param_6 = bVar14;\n    if (param_5 == (uint *)0x0) goto LAB_0001603e;\n  }\n  *param_5 = local_4c;\nLAB_0001603e:\n  *param_1 = local_44;\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0002b190();\n  }\n  return uVar4;\n}\n\n" comment (function_definition "uint __regparm3\nFUN_00015e10(undefined4 *param_1,byte *param_2,undefined4 param_3,int param_4,uint *param_5,\n            byte *param_6)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  bool bVar3;\n  uint uVar4;\n  size_t sVar5;\n  ushort **ppuVar6;\n  int iVar7;\n  int iVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  byte *pbVar12;\n  byte *pbVar13;\n  int in_GS_OFFSET;\n  byte bVar14;\n  byte *local_54;\n  uint local_4c;\n  byte *local_44;\n  bool local_35;\n  wchar_t local_2c;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  byte *pbVar11;\n  \n  bVar14 = 0;\n  uStack_14 = 0x15e1d;\n  local_44 = (byte *)*param_1;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar4 = FUN_00022de0(param_3);\n  if ((uVar4 < 3 & DAT_0003c2bc) == 0) {\n    bVar3 = false;\n    if (param_4 == 0) {\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }\n    else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }\n    if (param_5 == (uint *)0x0) {\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar5 = __ctype_get_mb_cur_max();\n    if (sVar5 < 2) {\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }\n    if (DAT_0003c354 != 0) goto LAB_00016015;\n    *param_6 = 0;\n  }\n  else {\n    if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }\n    uVar4 = strlen((char *)param_2);\n    if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }\n    memcpy(local_44,param_2,uVar4 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = uVar4;\n    sVar5 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }\n    bVar14 = DAT_0003c354;\n    if (DAT_0003c354 != 0) goto LAB_00016015;\nLAB_00016026:\n    *param_6 = bVar14;\n    if (param_5 == (uint *)0x0) goto LAB_0001603e;\n  }\n  *param_5 = local_4c;\nLAB_0001603e:\n  *param_1 = local_44;\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0002b190();\n  }\n  return uVar4;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00015e10(undefined4 *param_1,byte *param_2,undefined4 param_3,int param_4,uint *param_5,\n            byte *param_6)" identifier (parameter_list "(undefined4 *param_1,byte *param_2,undefined4 param_3,int param_4,uint *param_5,\n            byte *param_6)" ( (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 "undefined4 param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "uint *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "byte *param_6" type_identifier (pointer_declarator "*param_6" * identifier)) ))) (compound_statement "{\n  byte *pbVar1;\n  byte bVar2;\n  bool bVar3;\n  uint uVar4;\n  size_t sVar5;\n  ushort **ppuVar6;\n  int iVar7;\n  int iVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  byte *pbVar12;\n  byte *pbVar13;\n  int in_GS_OFFSET;\n  byte bVar14;\n  byte *local_54;\n  uint local_4c;\n  byte *local_44;\n  bool local_35;\n  wchar_t local_2c;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  byte *pbVar11;\n  \n  bVar14 = 0;\n  uStack_14 = 0x15e1d;\n  local_44 = (byte *)*param_1;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar4 = FUN_00022de0(param_3);\n  if ((uVar4 < 3 & DAT_0003c2bc) == 0) {\n    bVar3 = false;\n    if (param_4 == 0) {\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }\n    else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }\n    if (param_5 == (uint *)0x0) {\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar5 = __ctype_get_mb_cur_max();\n    if (sVar5 < 2) {\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }\n    if (DAT_0003c354 != 0) goto LAB_00016015;\n    *param_6 = 0;\n  }\n  else {\n    if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }\n    uVar4 = strlen((char *)param_2);\n    if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }\n    memcpy(local_44,param_2,uVar4 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = uVar4;\n    sVar5 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }\n    bVar14 = DAT_0003c354;\n    if (DAT_0003c354 != 0) goto LAB_00016015;\nLAB_00016026:\n    *param_6 = bVar14;\n    if (param_5 == (uint *)0x0) goto LAB_0001603e;\n  }\n  *param_5 = local_4c;\nLAB_0001603e:\n  *param_1 = local_44;\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0002b190();\n  }\n  return uVar4;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "ushort **ppuVar6;" type_identifier (pointer_declarator "**ppuVar6" * (pointer_declarator "*ppuVar6" * identifier)) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "byte *pbVar9;" type_identifier (pointer_declarator "*pbVar9" * identifier) ;) (declaration "byte *pbVar10;" type_identifier (pointer_declarator "*pbVar10" * identifier) ;) (declaration "byte *pbVar12;" type_identifier (pointer_declarator "*pbVar12" * identifier) ;) (declaration "byte *pbVar13;" type_identifier (pointer_declarator "*pbVar13" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "byte bVar14;" type_identifier identifier ;) (declaration "byte *local_54;" type_identifier (pointer_declarator "*local_54" * identifier) ;) (declaration "uint local_4c;" type_identifier identifier ;) (declaration "byte *local_44;" type_identifier (pointer_declarator "*local_44" * identifier) ;) (declaration "bool local_35;" primitive_type identifier ;) (declaration "wchar_t local_2c;" type_identifier identifier ;) (declaration "mbstate_t local_28;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (declaration "byte *pbVar11;" type_identifier (pointer_declarator "*pbVar11" * identifier) ;) (expression_statement "bVar14 = 0;" (assignment_expression "bVar14 = 0" identifier = number_literal) ;) (expression_statement "uStack_14 = 0x15e1d;" (assignment_expression "uStack_14 = 0x15e1d" identifier = number_literal) ;) (expression_statement "local_44 = (byte *)*param_1;" (assignment_expression "local_44 = (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_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar4 = FUN_00022de0(param_3);" (assignment_expression "uVar4 = FUN_00022de0(param_3)" identifier = (call_expression "FUN_00022de0(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (if_statement "if ((uVar4 < 3 & DAT_0003c2bc) == 0) {\n    bVar3 = false;\n    if (param_4 == 0) {\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }\n    else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }\n    if (param_5 == (uint *)0x0) {\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar5 = __ctype_get_mb_cur_max();\n    if (sVar5 < 2) {\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }\n    if (DAT_0003c354 != 0) goto LAB_00016015;\n    *param_6 = 0;\n  }\n  else {\n    if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }\n    uVar4 = strlen((char *)param_2);\n    if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }\n    memcpy(local_44,param_2,uVar4 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = uVar4;\n    sVar5 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }\n    bVar14 = DAT_0003c354;\n    if (DAT_0003c354 != 0) goto LAB_00016015;\nLAB_00016026:\n    *param_6 = bVar14;\n    if (param_5 == (uint *)0x0) goto LAB_0001603e;\n  }" if (parenthesized_expression "((uVar4 < 3 & DAT_0003c2bc) == 0)" ( (binary_expression "(uVar4 < 3 & DAT_0003c2bc) == 0" (parenthesized_expression "(uVar4 < 3 & DAT_0003c2bc)" ( (binary_expression "uVar4 < 3 & DAT_0003c2bc" (binary_expression "uVar4 < 3" identifier < number_literal) & identifier) )) == number_literal) )) (compound_statement "{\n    bVar3 = false;\n    if (param_4 == 0) {\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }\n    else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }\n    if (param_5 == (uint *)0x0) {\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar5 = __ctype_get_mb_cur_max();\n    if (sVar5 < 2) {\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }\n    if (DAT_0003c354 != 0) goto LAB_00016015;\n    *param_6 = 0;\n  }" { (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;) (if_statement "if (param_4 == 0) {\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }\n    else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }" if (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }" { (expression_statement "uVar4 = strlen((char *)param_2);" (assignment_expression "uVar4 = strlen((char *)param_2)" identifier = (call_expression "strlen((char *)param_2)" identifier (argument_list "((char *)param_2)" ( (cast_expression "(char *)param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "local_35 = false;" (assignment_expression "local_35 = false" identifier = false) ;) (expression_statement "local_44 = param_2;" (assignment_expression "local_44 = param_2" identifier = identifier) ;) }) (else_clause "else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }" else (compound_statement "{\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }" { (labeled_statement "LAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);" statement_identifier : (expression_statement "uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);" (assignment_expression "uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3)" identifier = (call_expression "FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3)" identifier (argument_list "(local_44,0x2000,param_2,0xffffffff,param_3)" ( identifier , number_literal , identifier , number_literal , identifier )))) ;)) (if_statement "if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }" if (parenthesized_expression "(0x1fff < uVar4)" ( (binary_expression "0x1fff < uVar4" number_literal < identifier) )) (compound_statement "{\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }" { (expression_statement "local_44 = (byte *)FUN_00023f30(uVar4 + 1);" (assignment_expression "local_44 = (byte *)FUN_00023f30(uVar4 + 1)" identifier = (cast_expression "(byte *)FUN_00023f30(uVar4 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00023f30(uVar4 + 1)" identifier (argument_list "(uVar4 + 1)" ( (binary_expression "uVar4 + 1" identifier + number_literal) ))))) ;) (expression_statement "FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);" (call_expression "FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3)" identifier (argument_list "(local_44,uVar4 + 1,param_2,0xffffffff,param_3)" ( identifier , (binary_expression "uVar4 + 1" identifier + number_literal) , identifier , number_literal , identifier ))) ;) })) (expression_statement "local_35 = true;" (assignment_expression "local_35 = true" identifier = true) ;) (if_statement "if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }" if (parenthesized_expression "(*param_2 == *local_44)" ( (binary_expression "*param_2 == *local_44" (pointer_expression "*param_2" * identifier) == (pointer_expression "*local_44" * identifier)) )) (compound_statement "{\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }" { (expression_statement "sVar5 = strlen((char *)param_2);" (assignment_expression "sVar5 = strlen((char *)param_2)" identifier = (call_expression "strlen((char *)param_2)" identifier (argument_list "((char *)param_2)" ( (cast_expression "(char *)param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "local_35 = uVar4 != sVar5;" (assignment_expression "local_35 = uVar4 != sVar5" identifier = (binary_expression "uVar4 != sVar5" identifier != identifier)) ;) })) (if_statement "if (bVar3) goto LAB_00015fbc;" if (parenthesized_expression "(bVar3)" ( identifier )) (goto_statement "goto LAB_00015fbc;" goto statement_identifier ;)) }))) (if_statement "if (param_5 == (uint *)0x0) {\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }" if (parenthesized_expression "(param_5 == (uint *)0x0)" ( (binary_expression "param_5 == (uint *)0x0" identifier == (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }" { (if_statement "if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }" if (parenthesized_expression "(DAT_0003c354 == 0)" ( (binary_expression "DAT_0003c354 == 0" identifier == number_literal) )) (compound_statement "{\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }" { (expression_statement "*param_6 = 0;" (assignment_expression "*param_6 = 0" (pointer_expression "*param_6" * identifier) = number_literal) ;) (goto_statement "goto LAB_0001603e;" goto statement_identifier ;) })) (labeled_statement "LAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;" statement_identifier : (expression_statement "bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;" (assignment_expression "bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1" identifier = (binary_expression "(DAT_0003c355 ^ 1 | local_35) ^ 1" (parenthesized_expression "(DAT_0003c355 ^ 1 | local_35)" ( (binary_expression "DAT_0003c355 ^ 1 | local_35" (binary_expression "DAT_0003c355 ^ 1" identifier ^ number_literal) | identifier) )) ^ number_literal)) ;)) (goto_statement "goto LAB_00016026;" goto statement_identifier ;) })) (expression_statement "sVar5 = __ctype_get_mb_cur_max();" (assignment_expression "sVar5 = __ctype_get_mb_cur_max()" identifier = (call_expression "__ctype_get_mb_cur_max()" identifier (argument_list "()" ( )))) ;) (if_statement "if (sVar5 < 2) {\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }" if (parenthesized_expression "(sVar5 < 2)" ( (binary_expression "sVar5 < 2" identifier < number_literal) )) (compound_statement "{\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }" { (if_statement "if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }" if (parenthesized_expression "(local_44 < local_44 + uVar4)" ( (binary_expression "local_44 < local_44 + uVar4" identifier < (binary_expression "local_44 + uVar4" identifier + identifier)) )) (compound_statement "{\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }" { (expression_statement "ppuVar6 = __ctype_b_loc();" (assignment_expression "ppuVar6 = __ctype_b_loc()" identifier = (call_expression "__ctype_b_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "local_4c = 0;" (assignment_expression "local_4c = 0" identifier = number_literal) ;) (expression_statement "pbVar12 = local_44;" (assignment_expression "pbVar12 = local_44" identifier = identifier) ;) (do_statement "do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);" do (compound_statement "{\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        }" { (expression_statement "local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);" (assignment_expression "local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0)" identifier = (binary_expression "(local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0)" (parenthesized_expression "(local_4c + 1)" ( (binary_expression "local_4c + 1" identifier + number_literal) )) - (call_expression "(uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(((*ppuVar6)[*pbVar12] & 0x4000) == 0)" ( (binary_expression "((*ppuVar6)[*pbVar12] & 0x4000) == 0" (parenthesized_expression "((*ppuVar6)[*pbVar12] & 0x4000)" ( (binary_expression "(*ppuVar6)[*pbVar12] & 0x4000" (subscript_expression "(*ppuVar6)[*pbVar12]" (parenthesized_expression "(*ppuVar6)" ( (pointer_expression "*ppuVar6" * identifier) )) [ (pointer_expression "*pbVar12" * identifier) ]) & number_literal) )) == number_literal) ))))) ;) (expression_statement "pbVar12 = pbVar12 + 1;" (assignment_expression "pbVar12 = pbVar12 + 1" identifier = (binary_expression "pbVar12 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(local_44 + uVar4 != pbVar12)" ( (binary_expression "local_44 + uVar4 != pbVar12" (binary_expression "local_44 + uVar4" identifier + identifier) != identifier) )) ;) }) (else_clause "else {\n        local_4c = 0;\n      }" else (compound_statement "{\n        local_4c = 0;\n      }" { (expression_statement "local_4c = 0;" (assignment_expression "local_4c = 0" identifier = number_literal) ;) }))) }) (else_clause "else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }" else (compound_statement "{\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }" { (expression_statement "local_4c = FUN_0001f960(local_44,uVar4,0);" (assignment_expression "local_4c = FUN_0001f960(local_44,uVar4,0)" identifier = (call_expression "FUN_0001f960(local_44,uVar4,0)" identifier (argument_list "(local_44,uVar4,0)" ( identifier , identifier , number_literal )))) ;) }))) (if_statement "if (DAT_0003c354 != 0) goto LAB_00016015;" if (parenthesized_expression "(DAT_0003c354 != 0)" ( (binary_expression "DAT_0003c354 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00016015;" goto statement_identifier ;)) (expression_statement "*param_6 = 0;" (assignment_expression "*param_6 = 0" (pointer_expression "*param_6" * identifier) = number_literal) ;) }) (else_clause "else {\n    if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }\n    uVar4 = strlen((char *)param_2);\n    if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }\n    memcpy(local_44,param_2,uVar4 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = uVar4;\n    sVar5 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }\n    bVar14 = DAT_0003c354;\n    if (DAT_0003c354 != 0) goto LAB_00016015;\nLAB_00016026:\n    *param_6 = bVar14;\n    if (param_5 == (uint *)0x0) goto LAB_0001603e;\n  }" else (compound_statement "{\n    if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }\n    uVar4 = strlen((char *)param_2);\n    if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }\n    memcpy(local_44,param_2,uVar4 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = uVar4;\n    sVar5 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }\n    bVar14 = DAT_0003c354;\n    if (DAT_0003c354 != 0) goto LAB_00016015;\nLAB_00016026:\n    *param_6 = bVar14;\n    if (param_5 == (uint *)0x0) goto LAB_0001603e;\n  }" { (if_statement "if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n      bVar3 = true;\n      goto LAB_00015e76;\n    }" { (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" identifier = true) ;) (goto_statement "goto LAB_00015e76;" goto statement_identifier ;) })) (expression_statement "uVar4 = strlen((char *)param_2);" (assignment_expression "uVar4 = strlen((char *)param_2)" identifier = (call_expression "strlen((char *)param_2)" identifier (argument_list "((char *)param_2)" ( (cast_expression "(char *)param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }" if (parenthesized_expression "(0x1fff < uVar4)" ( (binary_expression "0x1fff < uVar4" number_literal < identifier) )) (compound_statement "{\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }" { (expression_statement "local_44 = (byte *)FUN_00023f30(uVar4 + 1);" (assignment_expression "local_44 = (byte *)FUN_00023f30(uVar4 + 1)" identifier = (cast_expression "(byte *)FUN_00023f30(uVar4 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00023f30(uVar4 + 1)" identifier (argument_list "(uVar4 + 1)" ( (binary_expression "uVar4 + 1" identifier + number_literal) ))))) ;) })) (expression_statement "memcpy(local_44,param_2,uVar4 + 1);" (call_expression "memcpy(local_44,param_2,uVar4 + 1)" identifier (argument_list "(local_44,param_2,uVar4 + 1)" ( identifier , identifier , (binary_expression "uVar4 + 1" identifier + number_literal) ))) ;) (expression_statement "local_35 = false;" (assignment_expression "local_35 = false" identifier = false) ;) (labeled_statement "LAB_00015fbc:\n    local_4c = uVar4;" statement_identifier : (expression_statement "local_4c = uVar4;" (assignment_expression "local_4c = uVar4" identifier = identifier) ;)) (expression_statement "sVar5 = __ctype_get_mb_cur_max();" (assignment_expression "sVar5 = __ctype_get_mb_cur_max()" identifier = (call_expression "__ctype_get_mb_cur_max()" identifier (argument_list "()" ( )))) ;) (expression_statement "pbVar12 = local_44 + local_4c;" (assignment_expression "pbVar12 = local_44 + local_4c" identifier = (binary_expression "local_44 + local_4c" identifier + identifier)) ;) (if_statement "if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }" if (parenthesized_expression "(sVar5 < 2)" ( (binary_expression "sVar5 < 2" identifier < number_literal) )) (compound_statement "{\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }" { (expression_statement "uVar4 = local_4c;" (assignment_expression "uVar4 = local_4c" identifier = identifier) ;) (if_statement "if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }" if (parenthesized_expression "(local_44 < pbVar12)" ( (binary_expression "local_44 < pbVar12" identifier < identifier) )) (compound_statement "{\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }" { (expression_statement "ppuVar6 = __ctype_b_loc();" (assignment_expression "ppuVar6 = __ctype_b_loc()" identifier = (call_expression "__ctype_b_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "pbVar9 = local_44;" (assignment_expression "pbVar9 = local_44" identifier = identifier) ;) (do_statement "do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);" do (compound_statement "{\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        }" { (if_statement "if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }" if (parenthesized_expression "((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0)" ( (binary_expression "(*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0" (parenthesized_expression "(*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40)" ( (binary_expression "*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40" (pointer_expression "*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1)" * (cast_expression "(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1)" ( (binary_expression "(int)*ppuVar6 + (uint)*pbVar9 * 2 + 1" (binary_expression "(int)*ppuVar6 + (uint)*pbVar9 * 2" (cast_expression "(int)*ppuVar6" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*ppuVar6" * identifier)) + (binary_expression "(uint)*pbVar9 * 2" (binary_expression "(uint)*pbVar9" (parenthesized_expression "(uint)" ( identifier )) * identifier) * number_literal)) + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n            *pbVar9 = 0x3f;\n          }" { (expression_statement "*pbVar9 = 0x3f;" (assignment_expression "*pbVar9 = 0x3f" (pointer_expression "*pbVar9" * identifier) = number_literal) ;) })) (expression_statement "pbVar9 = pbVar9 + 1;" (assignment_expression "pbVar9 = pbVar9 + 1" identifier = (binary_expression "pbVar9 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pbVar9 != pbVar12)" ( (binary_expression "pbVar9 != pbVar12" identifier != identifier) )) ;) })) }) (else_clause "else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }" else (if_statement "if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }" if (parenthesized_expression "(local_44 < pbVar12)" ( (binary_expression "local_44 < pbVar12" identifier < identifier) )) (compound_statement "{\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }" { (expression_statement "local_4c = 0;" (assignment_expression "local_4c = 0" identifier = number_literal) ;) (expression_statement "local_54 = local_44;" (assignment_expression "local_54 = local_44" identifier = identifier) ;) (expression_statement "pbVar9 = local_44;" (assignment_expression "pbVar9 = local_44" identifier = identifier) ;) (do_statement "do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);" do (compound_statement "{\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      }" { (expression_statement "bVar2 = *pbVar9;" (assignment_expression "bVar2 = *pbVar9" identifier = (pointer_expression "*pbVar9" * identifier)) ;) (if_statement "if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }" if (parenthesized_expression "((char)bVar2 < '@')" ( (binary_expression "(char)bVar2 < '@'" (cast_expression "(char)bVar2" ( (type_descriptor "char" primitive_type) ) identifier) < (char_literal "'@'" ' character ')) )) (compound_statement "{\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }" { (if_statement "if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;" if (parenthesized_expression "(((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20)))" ( (binary_expression "((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))" (parenthesized_expression "((char)bVar2 < '%')" ( (binary_expression "(char)bVar2 < '%'" (cast_expression "(char)bVar2" ( (type_descriptor "char" primitive_type) ) identifier) < (char_literal "'%'" ' character ')) )) && (parenthesized_expression "(3 < (byte)(bVar2 - 0x20))" ( (binary_expression "3 < (byte)(bVar2 - 0x20)" number_literal < (call_expression "(byte)(bVar2 - 0x20)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar2 - 0x20)" ( (binary_expression "bVar2 - 0x20" identifier - number_literal) )))) ))) )) (goto_statement "goto LAB_000160d2;" goto statement_identifier ;)) (labeled_statement "LAB_0001609c:\n          local_4c = local_4c + 1;" statement_identifier : (expression_statement "local_4c = local_4c + 1;" (assignment_expression "local_4c = local_4c + 1" identifier = (binary_expression "local_4c + 1" identifier + number_literal)) ;)) (expression_statement "pbVar9 = pbVar9 + 1;" (assignment_expression "pbVar9 = pbVar9 + 1" identifier = (binary_expression "pbVar9 + 1" identifier + number_literal)) ;) (expression_statement "*local_54 = bVar2;" (assignment_expression "*local_54 = bVar2" (pointer_expression "*local_54" * identifier) = identifier) ;) (expression_statement "local_54 = local_54 + 1;" (assignment_expression "local_54 = local_54 + 1" identifier = (binary_expression "local_54 + 1" identifier + number_literal)) ;) }) (else_clause "else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }" else (compound_statement "{\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }" { (if_statement "if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;" if (parenthesized_expression "(('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))" ( (binary_expression "('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e)))" (parenthesized_expression "('@' < (char)bVar2)" ( (binary_expression "'@' < (char)bVar2" (char_literal "'@'" ' character ') < (cast_expression "(char)bVar2" ( (type_descriptor "char" primitive_type) ) identifier)) )) && (parenthesized_expression "(((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e)))" ( (parenthesized_expression "((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))" ( (binary_expression "(char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e)" (binary_expression "(char)bVar2 < '`'" (cast_expression "(char)bVar2" ( (type_descriptor "char" primitive_type) ) identifier) < (char_literal "'`'" ' character ')) || (parenthesized_expression "((byte)(bVar2 + 0x9f) < 0x1e)" ( (binary_expression "(byte)(bVar2 + 0x9f) < 0x1e" (call_expression "(byte)(bVar2 + 0x9f)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar2 + 0x9f)" ( (binary_expression "bVar2 + 0x9f" identifier + number_literal) ))) < number_literal) ))) )) ))) )) (goto_statement "goto LAB_0001609c;" goto statement_identifier ;)) (labeled_statement "LAB_000160d2:\n          local_28.__count = 0;" statement_identifier : (expression_statement "local_28.__count = 0;" (assignment_expression "local_28.__count = 0" (field_expression "local_28.__count" identifier . field_identifier) = number_literal) ;)) (expression_statement "local_28.__value.__wch = 0;" (assignment_expression "local_28.__value.__wch = 0" (field_expression "local_28.__value.__wch" (field_expression "local_28.__value" identifier . field_identifier) . field_identifier) = number_literal) ;) (expression_statement "pbVar11 = pbVar9;" (assignment_expression "pbVar11 = pbVar9" identifier = identifier) ;) (do_statement "do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);" do (compound_statement "{\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          }" { (expression_statement "iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);" (assignment_expression "iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28)" identifier = (call_expression "FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28)" identifier (argument_list "(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28)" ( (pointer_expression "&local_2c" & identifier) , identifier , (binary_expression "(int)pbVar12 - (int)pbVar11" (cast_expression "(int)pbVar12" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar11" ( (type_descriptor "int" primitive_type) ) identifier)) , (pointer_expression "&local_28" & identifier) )))) ;) (expression_statement "pbVar1 = local_54 + 1;" (assignment_expression "pbVar1 = local_54 + 1" identifier = (binary_expression "local_54 + 1" identifier + number_literal)) ;) (if_statement "if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }" if (parenthesized_expression "(iVar7 == -1)" ( (binary_expression "iVar7 == -1" identifier == number_literal) )) (compound_statement "{\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }" { (expression_statement "pbVar9 = pbVar11 + 1;" (assignment_expression "pbVar9 = pbVar11 + 1" identifier = (binary_expression "pbVar11 + 1" identifier + number_literal)) ;) (expression_statement "*local_54 = 0x3f;" (assignment_expression "*local_54 = 0x3f" (pointer_expression "*local_54" * identifier) = number_literal) ;) (labeled_statement "LAB_000161e7:\n              local_4c = local_4c + 1;" statement_identifier : (expression_statement "local_4c = local_4c + 1;" (assignment_expression "local_4c = local_4c + 1" identifier = (binary_expression "local_4c + 1" identifier + number_literal)) ;)) (expression_statement "local_54 = pbVar1;" (assignment_expression "local_54 = pbVar1" identifier = identifier) ;) (break_statement "break;" break ;) })) (if_statement "if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }" if (parenthesized_expression "(iVar7 == -2)" ( (binary_expression "iVar7 == -2" identifier == number_literal) )) (compound_statement "{\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }" { (expression_statement "*local_54 = 0x3f;" (assignment_expression "*local_54 = 0x3f" (pointer_expression "*local_54" * identifier) = number_literal) ;) (expression_statement "pbVar9 = pbVar12;" (assignment_expression "pbVar9 = pbVar12" identifier = identifier) ;) (goto_statement "goto LAB_000161e7;" goto statement_identifier ;) })) (if_statement "if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }" if (parenthesized_expression "(iVar7 == 0)" ( (binary_expression "iVar7 == 0" identifier == number_literal) )) (compound_statement "{\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }" { (expression_statement "iVar8 = wcwidth(local_2c);" (assignment_expression "iVar8 = wcwidth(local_2c)" identifier = (call_expression "wcwidth(local_2c)" identifier (argument_list "(local_2c)" ( identifier )))) ;) (expression_statement "pbVar9 = pbVar11 + 1;" (assignment_expression "pbVar9 = pbVar11 + 1" identifier = (binary_expression "pbVar11 + 1" identifier + number_literal)) ;) (if_statement "if (iVar8 < 0) goto LAB_000160ff;" if (parenthesized_expression "(iVar8 < 0)" ( (binary_expression "iVar8 < 0" identifier < number_literal) )) (goto_statement "goto LAB_000160ff;" goto statement_identifier ;)) (expression_statement "*local_54 = *pbVar11;" (assignment_expression "*local_54 = *pbVar11" (pointer_expression "*local_54" * identifier) = (pointer_expression "*pbVar11" * identifier)) ;) (expression_statement "pbVar10 = pbVar9;" (assignment_expression "pbVar10 = pbVar9" identifier = identifier) ;) (expression_statement "local_54 = pbVar1;" (assignment_expression "local_54 = pbVar1" identifier = identifier) ;) (labeled_statement "LAB_00016181:\n              local_4c = local_4c + iVar8;" statement_identifier : (expression_statement "local_4c = local_4c + iVar8;" (assignment_expression "local_4c = local_4c + iVar8" identifier = (binary_expression "local_4c + iVar8" identifier + identifier)) ;)) (expression_statement "pbVar9 = pbVar10;" (assignment_expression "pbVar9 = pbVar10" identifier = identifier) ;) }) (else_clause "else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }" else (compound_statement "{\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }" { (expression_statement "iVar8 = wcwidth(local_2c);" (assignment_expression "iVar8 = wcwidth(local_2c)" identifier = (call_expression "wcwidth(local_2c)" identifier (argument_list "(local_2c)" ( identifier )))) ;) (expression_statement "pbVar9 = pbVar11 + iVar7;" (assignment_expression "pbVar9 = pbVar11 + iVar7" identifier = (binary_expression "pbVar11 + iVar7" identifier + identifier)) ;) (expression_statement "pbVar13 = local_54;" (assignment_expression "pbVar13 = local_54" identifier = identifier) ;) (if_statement "if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }" if (parenthesized_expression "(-1 < iVar8)" ( (binary_expression "-1 < iVar8" number_literal < identifier) )) (compound_statement "{\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }" { (do_statement "do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);" do (compound_statement "{\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                }" { (expression_statement "pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;" (assignment_expression "pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1" identifier = (binary_expression "pbVar11 + (uint)bVar14 * -2 + 1" (binary_expression "pbVar11 + (uint)bVar14 * -2" identifier + (binary_expression "(uint)bVar14 * -2" (cast_expression "(uint)bVar14" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "*pbVar13 = *pbVar11;" (assignment_expression "*pbVar13 = *pbVar11" (pointer_expression "*pbVar13" * identifier) = (pointer_expression "*pbVar11" * identifier)) ;) (expression_statement "pbVar11 = pbVar10;" (assignment_expression "pbVar11 = pbVar10" identifier = identifier) ;) (expression_statement "pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;" (assignment_expression "pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1" identifier = (binary_expression "pbVar13 + (uint)bVar14 * -2 + 1" (binary_expression "pbVar13 + (uint)bVar14 * -2" identifier + (binary_expression "(uint)bVar14 * -2" (cast_expression "(uint)bVar14" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(pbVar10 != pbVar9)" ( (binary_expression "pbVar10 != pbVar9" identifier != identifier) )) ;) (expression_statement "local_54 = local_54 + iVar7;" (assignment_expression "local_54 = local_54 + iVar7" identifier = (binary_expression "local_54 + iVar7" identifier + identifier)) ;) (goto_statement "goto LAB_00016181;" goto statement_identifier ;) })) (labeled_statement "LAB_000160ff:\n              local_4c = local_4c + 1;" statement_identifier : (expression_statement "local_4c = local_4c + 1;" (assignment_expression "local_4c = local_4c + 1" identifier = (binary_expression "local_4c + 1" identifier + number_literal)) ;)) (expression_statement "*local_54 = 0x3f;" (assignment_expression "*local_54 = 0x3f" (pointer_expression "*local_54" * identifier) = number_literal) ;) (expression_statement "local_54 = pbVar1;" (assignment_expression "local_54 = pbVar1" identifier = identifier) ;) }))) (expression_statement "iVar7 = mbsinit(&local_28);" (assignment_expression "iVar7 = mbsinit(&local_28)" identifier = (call_expression "mbsinit(&local_28)" identifier (argument_list "(&local_28)" ( (pointer_expression "&local_28" & identifier) )))) ;) (expression_statement "pbVar11 = pbVar9;" (assignment_expression "pbVar11 = pbVar9" identifier = identifier) ;) }) while (parenthesized_expression "(iVar7 == 0)" ( (binary_expression "iVar7 == 0" identifier == number_literal) )) ;) }))) }) while (parenthesized_expression "(pbVar9 < pbVar12)" ( (binary_expression "pbVar9 < pbVar12" identifier < identifier) )) ;) (expression_statement "uVar4 = (int)local_54 - (int)local_44;" (assignment_expression "uVar4 = (int)local_54 - (int)local_44" identifier = (binary_expression "(int)local_54 - (int)local_44" (cast_expression "(int)local_54" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)local_44" ( (type_descriptor "int" primitive_type) ) identifier))) ;) }) (else_clause "else {\n      local_4c = 0;\n      uVar4 = 0;\n    }" else (compound_statement "{\n      local_4c = 0;\n      uVar4 = 0;\n    }" { (expression_statement "local_4c = 0;" (assignment_expression "local_4c = 0" identifier = number_literal) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }))))) (expression_statement "bVar14 = DAT_0003c354;" (assignment_expression "bVar14 = DAT_0003c354" identifier = identifier) ;) (if_statement "if (DAT_0003c354 != 0) goto LAB_00016015;" if (parenthesized_expression "(DAT_0003c354 != 0)" ( (binary_expression "DAT_0003c354 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00016015;" goto statement_identifier ;)) (labeled_statement "LAB_00016026:\n    *param_6 = bVar14;" statement_identifier : (expression_statement "*param_6 = bVar14;" (assignment_expression "*param_6 = bVar14" (pointer_expression "*param_6" * identifier) = identifier) ;)) (if_statement "if (param_5 == (uint *)0x0) goto LAB_0001603e;" if (parenthesized_expression "(param_5 == (uint *)0x0)" ( (binary_expression "param_5 == (uint *)0x0" identifier == (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0001603e;" goto statement_identifier ;)) }))) (expression_statement "*param_5 = local_4c;" (assignment_expression "*param_5 = local_4c" (pointer_expression "*param_5" * identifier) = identifier) ;) (labeled_statement "LAB_0001603e:\n  *param_1 = local_44;" statement_identifier : (expression_statement "*param_1 = local_44;" (assignment_expression "*param_1 = local_44" (pointer_expression "*param_1" * identifier) = identifier) ;)) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0002b190();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_0002b190();\n  }" { comment (expression_statement "FUN_0002b190();" (call_expression "FUN_0002b190()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nsize_t __regparm3\nquote_name_buf(char **inbuf,size_t bufsize,char *name,quoting_options *options,\n              int needs_general_quoting,size_t *width,_Bool *pad)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  int iVar3;\n  bool bVar4;\n  quoting_style qVar5;\n  size_t sVar6;\n  size_t sVar7;\n  ushort **ppuVar8;\n  int iVar9;\n  byte *pbVar10;\n  byte *pbVar11;\n  byte *pbVar12;\n  byte *pbVar13;\n  int in_GS_OFFSET;\n  byte bVar14;\n  byte *local_54;\n  size_t local_4c;\n  byte *local_44;\n  bool local_35;\n  wchar_t wc;\n  mbstate_t mbstate;\n  byte *s;\n  \n  bVar14 = 0;\n  local_44 = (byte *)*inbuf;\n  iVar3 = *(int *)(in_GS_OFFSET + 0x14);\n  qVar5 = get_quoting_style((quoting_options *)name);\n  if ((qVar5 < shell_escape_quoting_style & qmark_funny_chars) == 0) {\n    bVar4 = false;\n    if (options == (quoting_options *)0x0) {\n      sVar6 = strlen((char *)bufsize);\n      local_35 = false;\n      local_44 = (byte *)bufsize;\n    }\n    else {\nLAB_00015e76:\n      sVar6 = quotearg_buffer((char *)local_44,0x2000,(char *)bufsize,0xffffffff,\n                              (quoting_options *)name);\n      if (0x1fff < sVar6) {\n        local_44 = (byte *)xmalloc(sVar6 + 1);\n        quotearg_buffer((char *)local_44,sVar6 + 1,(char *)bufsize,0xffffffff,\n                        (quoting_options *)name);\n      }\n      local_35 = true;\n      if (*(byte *)bufsize == *local_44) {\n        sVar7 = strlen((char *)bufsize);\n        local_35 = sVar6 != sVar7;\n      }\n      if (bVar4) goto LAB_00015fbc;\n    }\n    if (needs_general_quoting == 0) {\n      if (align_variable_outer_quotes == false) {\n        *(undefined1 *)width = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (cwd_some_quoted ^ 1U | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar7 = __ctype_get_mb_cur_max();\n    if (sVar7 < 2) {\n      if (local_44 < local_44 + sVar6) {\n        ppuVar8 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar8)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + sVar6 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = mbsnwidth((char *)local_44,sVar6,0);\n    }\n    if (align_variable_outer_quotes != false) goto LAB_00016015;\n    *(undefined1 *)width = 0;\n  }\n  else {\n    if (options != (quoting_options *)0x0) {\n      bVar4 = true;\n      goto LAB_00015e76;\n    }\n    sVar6 = strlen((char *)bufsize);\n    if (0x1fff < sVar6) {\n      local_44 = (byte *)xmalloc(sVar6 + 1);\n    }\n    memcpy(local_44,(void *)bufsize,sVar6 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = sVar6;\n    sVar7 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar7 < 2) {\n      sVar6 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar8 = __ctype_b_loc();\n        pbVar10 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40) == 0) {\n            *pbVar10 = 0x3f;\n          }\n          pbVar10 = pbVar10 + 1;\n        } while (pbVar10 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar10 = local_44;\n      do {\n        bVar2 = *pbVar10;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar10 = pbVar10 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          s = pbVar10;\n          do {\n            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);\n            pbVar1 = local_54 + 1;\n            if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar9 = mbsinit((mbstate_t *)&mbstate);\n            s = pbVar10;\n          } while (iVar9 == 0);\n        }\n      } while (pbVar10 < pbVar12);\n      sVar6 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      sVar6 = 0;\n    }\n    bVar14 = align_variable_outer_quotes;\n    if (align_variable_outer_quotes != false) goto LAB_00016015;\nLAB_00016026:\n    *(byte *)width = bVar14;\n    if (needs_general_quoting == 0) goto LAB_0001603e;\n  }\n  *(size_t *)needs_general_quoting = local_4c;\nLAB_0001603e:\n  *inbuf = (char *)local_44;\n  if (iVar3 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return sVar6;\n}\n\n" comment (function_definition "size_t __regparm3\nquote_name_buf(char **inbuf,size_t bufsize,char *name,quoting_options *options,\n              int needs_general_quoting,size_t *width,_Bool *pad)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  int iVar3;\n  bool bVar4;\n  quoting_style qVar5;\n  size_t sVar6;\n  size_t sVar7;\n  ushort **ppuVar8;\n  int iVar9;\n  byte *pbVar10;\n  byte *pbVar11;\n  byte *pbVar12;\n  byte *pbVar13;\n  int in_GS_OFFSET;\n  byte bVar14;\n  byte *local_54;\n  size_t local_4c;\n  byte *local_44;\n  bool local_35;\n  wchar_t wc;\n  mbstate_t mbstate;\n  byte *s;\n  \n  bVar14 = 0;\n  local_44 = (byte *)*inbuf;\n  iVar3 = *(int *)(in_GS_OFFSET + 0x14);\n  qVar5 = get_quoting_style((quoting_options *)name);\n  if ((qVar5 < shell_escape_quoting_style & qmark_funny_chars) == 0) {\n    bVar4 = false;\n    if (options == (quoting_options *)0x0) {\n      sVar6 = strlen((char *)bufsize);\n      local_35 = false;\n      local_44 = (byte *)bufsize;\n    }\n    else {\nLAB_00015e76:\n      sVar6 = quotearg_buffer((char *)local_44,0x2000,(char *)bufsize,0xffffffff,\n                              (quoting_options *)name);\n      if (0x1fff < sVar6) {\n        local_44 = (byte *)xmalloc(sVar6 + 1);\n        quotearg_buffer((char *)local_44,sVar6 + 1,(char *)bufsize,0xffffffff,\n                        (quoting_options *)name);\n      }\n      local_35 = true;\n      if (*(byte *)bufsize == *local_44) {\n        sVar7 = strlen((char *)bufsize);\n        local_35 = sVar6 != sVar7;\n      }\n      if (bVar4) goto LAB_00015fbc;\n    }\n    if (needs_general_quoting == 0) {\n      if (align_variable_outer_quotes == false) {\n        *(undefined1 *)width = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (cwd_some_quoted ^ 1U | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar7 = __ctype_get_mb_cur_max();\n    if (sVar7 < 2) {\n      if (local_44 < local_44 + sVar6) {\n        ppuVar8 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar8)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + sVar6 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = mbsnwidth((char *)local_44,sVar6,0);\n    }\n    if (align_variable_outer_quotes != false) goto LAB_00016015;\n    *(undefined1 *)width = 0;\n  }\n  else {\n    if (options != (quoting_options *)0x0) {\n      bVar4 = true;\n      goto LAB_00015e76;\n    }\n    sVar6 = strlen((char *)bufsize);\n    if (0x1fff < sVar6) {\n      local_44 = (byte *)xmalloc(sVar6 + 1);\n    }\n    memcpy(local_44,(void *)bufsize,sVar6 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = sVar6;\n    sVar7 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar7 < 2) {\n      sVar6 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar8 = __ctype_b_loc();\n        pbVar10 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40) == 0) {\n            *pbVar10 = 0x3f;\n          }\n          pbVar10 = pbVar10 + 1;\n        } while (pbVar10 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar10 = local_44;\n      do {\n        bVar2 = *pbVar10;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar10 = pbVar10 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          s = pbVar10;\n          do {\n            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);\n            pbVar1 = local_54 + 1;\n            if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar9 = mbsinit((mbstate_t *)&mbstate);\n            s = pbVar10;\n          } while (iVar9 == 0);\n        }\n      } while (pbVar10 < pbVar12);\n      sVar6 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      sVar6 = 0;\n    }\n    bVar14 = align_variable_outer_quotes;\n    if (align_variable_outer_quotes != false) goto LAB_00016015;\nLAB_00016026:\n    *(byte *)width = bVar14;\n    if (needs_general_quoting == 0) goto LAB_0001603e;\n  }\n  *(size_t *)needs_general_quoting = local_4c;\nLAB_0001603e:\n  *inbuf = (char *)local_44;\n  if (iVar3 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return sVar6;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "quote_name_buf(char **inbuf,size_t bufsize,char *name,quoting_options *options,\n              int needs_general_quoting,size_t *width,_Bool *pad)" identifier (parameter_list "(char **inbuf,size_t bufsize,char *name,quoting_options *options,\n              int needs_general_quoting,size_t *width,_Bool *pad)" ( (parameter_declaration "char **inbuf" primitive_type (pointer_declarator "**inbuf" * (pointer_declarator "*inbuf" * identifier))) , (parameter_declaration "size_t bufsize" primitive_type identifier) , (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) , (parameter_declaration "quoting_options *options" type_identifier (pointer_declarator "*options" * identifier)) , (parameter_declaration "int needs_general_quoting" primitive_type identifier) , (parameter_declaration "size_t *width" primitive_type (pointer_declarator "*width" * identifier)) , (parameter_declaration "_Bool *pad" type_identifier (pointer_declarator "*pad" * identifier)) ))) (compound_statement "{\n  byte *pbVar1;\n  byte bVar2;\n  int iVar3;\n  bool bVar4;\n  quoting_style qVar5;\n  size_t sVar6;\n  size_t sVar7;\n  ushort **ppuVar8;\n  int iVar9;\n  byte *pbVar10;\n  byte *pbVar11;\n  byte *pbVar12;\n  byte *pbVar13;\n  int in_GS_OFFSET;\n  byte bVar14;\n  byte *local_54;\n  size_t local_4c;\n  byte *local_44;\n  bool local_35;\n  wchar_t wc;\n  mbstate_t mbstate;\n  byte *s;\n  \n  bVar14 = 0;\n  local_44 = (byte *)*inbuf;\n  iVar3 = *(int *)(in_GS_OFFSET + 0x14);\n  qVar5 = get_quoting_style((quoting_options *)name);\n  if ((qVar5 < shell_escape_quoting_style & qmark_funny_chars) == 0) {\n    bVar4 = false;\n    if (options == (quoting_options *)0x0) {\n      sVar6 = strlen((char *)bufsize);\n      local_35 = false;\n      local_44 = (byte *)bufsize;\n    }\n    else {\nLAB_00015e76:\n      sVar6 = quotearg_buffer((char *)local_44,0x2000,(char *)bufsize,0xffffffff,\n                              (quoting_options *)name);\n      if (0x1fff < sVar6) {\n        local_44 = (byte *)xmalloc(sVar6 + 1);\n        quotearg_buffer((char *)local_44,sVar6 + 1,(char *)bufsize,0xffffffff,\n                        (quoting_options *)name);\n      }\n      local_35 = true;\n      if (*(byte *)bufsize == *local_44) {\n        sVar7 = strlen((char *)bufsize);\n        local_35 = sVar6 != sVar7;\n      }\n      if (bVar4) goto LAB_00015fbc;\n    }\n    if (needs_general_quoting == 0) {\n      if (align_variable_outer_quotes == false) {\n        *(undefined1 *)width = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (cwd_some_quoted ^ 1U | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar7 = __ctype_get_mb_cur_max();\n    if (sVar7 < 2) {\n      if (local_44 < local_44 + sVar6) {\n        ppuVar8 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar8)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + sVar6 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = mbsnwidth((char *)local_44,sVar6,0);\n    }\n    if (align_variable_outer_quotes != false) goto LAB_00016015;\n    *(undefined1 *)width = 0;\n  }\n  else {\n    if (options != (quoting_options *)0x0) {\n      bVar4 = true;\n      goto LAB_00015e76;\n    }\n    sVar6 = strlen((char *)bufsize);\n    if (0x1fff < sVar6) {\n      local_44 = (byte *)xmalloc(sVar6 + 1);\n    }\n    memcpy(local_44,(void *)bufsize,sVar6 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = sVar6;\n    sVar7 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar7 < 2) {\n      sVar6 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar8 = __ctype_b_loc();\n        pbVar10 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40) == 0) {\n            *pbVar10 = 0x3f;\n          }\n          pbVar10 = pbVar10 + 1;\n        } while (pbVar10 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar10 = local_44;\n      do {\n        bVar2 = *pbVar10;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar10 = pbVar10 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          s = pbVar10;\n          do {\n            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);\n            pbVar1 = local_54 + 1;\n            if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar9 = mbsinit((mbstate_t *)&mbstate);\n            s = pbVar10;\n          } while (iVar9 == 0);\n        }\n      } while (pbVar10 < pbVar12);\n      sVar6 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      sVar6 = 0;\n    }\n    bVar14 = align_variable_outer_quotes;\n    if (align_variable_outer_quotes != false) goto LAB_00016015;\nLAB_00016026:\n    *(byte *)width = bVar14;\n    if (needs_general_quoting == 0) goto LAB_0001603e;\n  }\n  *(size_t *)needs_general_quoting = local_4c;\nLAB_0001603e:\n  *inbuf = (char *)local_44;\n  if (iVar3 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return sVar6;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "bool bVar4;" primitive_type identifier ;) (declaration "quoting_style qVar5;" type_identifier identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "size_t sVar7;" primitive_type identifier ;) (declaration "ushort **ppuVar8;" type_identifier (pointer_declarator "**ppuVar8" * (pointer_declarator "*ppuVar8" * identifier)) ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "byte *pbVar10;" type_identifier (pointer_declarator "*pbVar10" * identifier) ;) (declaration "byte *pbVar11;" type_identifier (pointer_declarator "*pbVar11" * identifier) ;) (declaration "byte *pbVar12;" type_identifier (pointer_declarator "*pbVar12" * identifier) ;) (declaration "byte *pbVar13;" type_identifier (pointer_declarator "*pbVar13" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "byte bVar14;" type_identifier identifier ;) (declaration "byte *local_54;" type_identifier (pointer_declarator "*local_54" * identifier) ;) (declaration "size_t local_4c;" primitive_type identifier ;) (declaration "byte *local_44;" type_identifier (pointer_declarator "*local_44" * identifier) ;) (declaration "bool local_35;" primitive_type identifier ;) (declaration "wchar_t wc;" type_identifier identifier ;) (declaration "mbstate_t mbstate;" type_identifier identifier ;) (declaration "byte *s;" type_identifier (pointer_declarator "*s" * identifier) ;) (expression_statement "bVar14 = 0;" (assignment_expression "bVar14 = 0" identifier = number_literal) ;) (expression_statement "local_44 = (byte *)*inbuf;" (assignment_expression "local_44 = (byte *)*inbuf" identifier = (cast_expression "(byte *)*inbuf" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*inbuf" * identifier))) ;) (expression_statement "iVar3 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar3 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "qVar5 = get_quoting_style((quoting_options *)name);" (assignment_expression "qVar5 = get_quoting_style((quoting_options *)name)" identifier = (call_expression "get_quoting_style((quoting_options *)name)" identifier (argument_list "((quoting_options *)name)" ( (cast_expression "(quoting_options *)name" ( (type_descriptor "quoting_options *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if ((qVar5 < shell_escape_quoting_style & qmark_funny_chars) == 0) {\n    bVar4 = false;\n    if (options == (quoting_options *)0x0) {\n      sVar6 = strlen((char *)bufsize);\n      local_35 = false;\n      local_44 = (byte *)bufsize;\n    }\n    else {\nLAB_00015e76:\n      sVar6 = quotearg_buffer((char *)local_44,0x2000,(char *)bufsize,0xffffffff,\n                              (quoting_options *)name);\n      if (0x1fff < sVar6) {\n        local_44 = (byte *)xmalloc(sVar6 + 1);\n        quotearg_buffer((char *)local_44,sVar6 + 1,(char *)bufsize,0xffffffff,\n                        (quoting_options *)name);\n      }\n      local_35 = true;\n      if (*(byte *)bufsize == *local_44) {\n        sVar7 = strlen((char *)bufsize);\n        local_35 = sVar6 != sVar7;\n      }\n      if (bVar4) goto LAB_00015fbc;\n    }\n    if (needs_general_quoting == 0) {\n      if (align_variable_outer_quotes == false) {\n        *(undefined1 *)width = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (cwd_some_quoted ^ 1U | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar7 = __ctype_get_mb_cur_max();\n    if (sVar7 < 2) {\n      if (local_44 < local_44 + sVar6) {\n        ppuVar8 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar8)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + sVar6 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = mbsnwidth((char *)local_44,sVar6,0);\n    }\n    if (align_variable_outer_quotes != false) goto LAB_00016015;\n    *(undefined1 *)width = 0;\n  }\n  else {\n    if (options != (quoting_options *)0x0) {\n      bVar4 = true;\n      goto LAB_00015e76;\n    }\n    sVar6 = strlen((char *)bufsize);\n    if (0x1fff < sVar6) {\n      local_44 = (byte *)xmalloc(sVar6 + 1);\n    }\n    memcpy(local_44,(void *)bufsize,sVar6 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = sVar6;\n    sVar7 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar7 < 2) {\n      sVar6 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar8 = __ctype_b_loc();\n        pbVar10 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40) == 0) {\n            *pbVar10 = 0x3f;\n          }\n          pbVar10 = pbVar10 + 1;\n        } while (pbVar10 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar10 = local_44;\n      do {\n        bVar2 = *pbVar10;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar10 = pbVar10 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          s = pbVar10;\n          do {\n            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);\n            pbVar1 = local_54 + 1;\n            if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar9 = mbsinit((mbstate_t *)&mbstate);\n            s = pbVar10;\n          } while (iVar9 == 0);\n        }\n      } while (pbVar10 < pbVar12);\n      sVar6 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      sVar6 = 0;\n    }\n    bVar14 = align_variable_outer_quotes;\n    if (align_variable_outer_quotes != false) goto LAB_00016015;\nLAB_00016026:\n    *(byte *)width = bVar14;\n    if (needs_general_quoting == 0) goto LAB_0001603e;\n  }" if (parenthesized_expression "((qVar5 < shell_escape_quoting_style & qmark_funny_chars) == 0)" ( (binary_expression "(qVar5 < shell_escape_quoting_style & qmark_funny_chars) == 0" (parenthesized_expression "(qVar5 < shell_escape_quoting_style & qmark_funny_chars)" ( (binary_expression "qVar5 < shell_escape_quoting_style & qmark_funny_chars" (binary_expression "qVar5 < shell_escape_quoting_style" identifier < identifier) & identifier) )) == number_literal) )) (compound_statement "{\n    bVar4 = false;\n    if (options == (quoting_options *)0x0) {\n      sVar6 = strlen((char *)bufsize);\n      local_35 = false;\n      local_44 = (byte *)bufsize;\n    }\n    else {\nLAB_00015e76:\n      sVar6 = quotearg_buffer((char *)local_44,0x2000,(char *)bufsize,0xffffffff,\n                              (quoting_options *)name);\n      if (0x1fff < sVar6) {\n        local_44 = (byte *)xmalloc(sVar6 + 1);\n        quotearg_buffer((char *)local_44,sVar6 + 1,(char *)bufsize,0xffffffff,\n                        (quoting_options *)name);\n      }\n      local_35 = true;\n      if (*(byte *)bufsize == *local_44) {\n        sVar7 = strlen((char *)bufsize);\n        local_35 = sVar6 != sVar7;\n      }\n      if (bVar4) goto LAB_00015fbc;\n    }\n    if (needs_general_quoting == 0) {\n      if (align_variable_outer_quotes == false) {\n        *(undefined1 *)width = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (cwd_some_quoted ^ 1U | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar7 = __ctype_get_mb_cur_max();\n    if (sVar7 < 2) {\n      if (local_44 < local_44 + sVar6) {\n        ppuVar8 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar8)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + sVar6 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = mbsnwidth((char *)local_44,sVar6,0);\n    }\n    if (align_variable_outer_quotes != false) goto LAB_00016015;\n    *(undefined1 *)width = 0;\n  }" { (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" identifier = false) ;) (if_statement "if (options == (quoting_options *)0x0) {\n      sVar6 = strlen((char *)bufsize);\n      local_35 = false;\n      local_44 = (byte *)bufsize;\n    }\n    else {\nLAB_00015e76:\n      sVar6 = quotearg_buffer((char *)local_44,0x2000,(char *)bufsize,0xffffffff,\n                              (quoting_options *)name);\n      if (0x1fff < sVar6) {\n        local_44 = (byte *)xmalloc(sVar6 + 1);\n        quotearg_buffer((char *)local_44,sVar6 + 1,(char *)bufsize,0xffffffff,\n                        (quoting_options *)name);\n      }\n      local_35 = true;\n      if (*(byte *)bufsize == *local_44) {\n        sVar7 = strlen((char *)bufsize);\n        local_35 = sVar6 != sVar7;\n      }\n      if (bVar4) goto LAB_00015fbc;\n    }" if (parenthesized_expression "(options == (quoting_options *)0x0)" ( (binary_expression "options == (quoting_options *)0x0" identifier == (cast_expression "(quoting_options *)0x0" ( (type_descriptor "quoting_options *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      sVar6 = strlen((char *)bufsize);\n      local_35 = false;\n      local_44 = (byte *)bufsize;\n    }" { (expression_statement "sVar6 = strlen((char *)bufsize);" (assignment_expression "sVar6 = strlen((char *)bufsize)" identifier = (call_expression "strlen((char *)bufsize)" identifier (argument_list "((char *)bufsize)" ( (cast_expression "(char *)bufsize" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "local_35 = false;" (assignment_expression "local_35 = false" identifier = false) ;) (expression_statement "local_44 = (byte *)bufsize;" (assignment_expression "local_44 = (byte *)bufsize" identifier = (cast_expression "(byte *)bufsize" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) }) (else_clause "else {\nLAB_00015e76:\n      sVar6 = quotearg_buffer((char *)local_44,0x2000,(char *)bufsize,0xffffffff,\n                              (quoting_options *)name);\n      if (0x1fff < sVar6) {\n        local_44 = (byte *)xmalloc(sVar6 + 1);\n        quotearg_buffer((char *)local_44,sVar6 + 1,(char *)bufsize,0xffffffff,\n                        (quoting_options *)name);\n      }\n      local_35 = true;\n      if (*(byte *)bufsize == *local_44) {\n        sVar7 = strlen((char *)bufsize);\n        local_35 = sVar6 != sVar7;\n      }\n      if (bVar4) goto LAB_00015fbc;\n    }" else (compound_statement "{\nLAB_00015e76:\n      sVar6 = quotearg_buffer((char *)local_44,0x2000,(char *)bufsize,0xffffffff,\n                              (quoting_options *)name);\n      if (0x1fff < sVar6) {\n        local_44 = (byte *)xmalloc(sVar6 + 1);\n        quotearg_buffer((char *)local_44,sVar6 + 1,(char *)bufsize,0xffffffff,\n                        (quoting_options *)name);\n      }\n      local_35 = true;\n      if (*(byte *)bufsize == *local_44) {\n        sVar7 = strlen((char *)bufsize);\n        local_35 = sVar6 != sVar7;\n      }\n      if (bVar4) goto LAB_00015fbc;\n    }" { (labeled_statement "LAB_00015e76:\n      sVar6 = quotearg_buffer((char *)local_44,0x2000,(char *)bufsize,0xffffffff,\n                              (quoting_options *)name);" statement_identifier : (expression_statement "sVar6 = quotearg_buffer((char *)local_44,0x2000,(char *)bufsize,0xffffffff,\n                              (quoting_options *)name);" (assignment_expression "sVar6 = quotearg_buffer((char *)local_44,0x2000,(char *)bufsize,0xffffffff,\n                              (quoting_options *)name)" identifier = (call_expression "quotearg_buffer((char *)local_44,0x2000,(char *)bufsize,0xffffffff,\n                              (quoting_options *)name)" identifier (argument_list "((char *)local_44,0x2000,(char *)bufsize,0xffffffff,\n                              (quoting_options *)name)" ( (cast_expression "(char *)local_44" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , number_literal , (cast_expression "(char *)bufsize" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , number_literal , (cast_expression "(quoting_options *)name" ( (type_descriptor "quoting_options *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;)) (if_statement "if (0x1fff < sVar6) {\n        local_44 = (byte *)xmalloc(sVar6 + 1);\n        quotearg_buffer((char *)local_44,sVar6 + 1,(char *)bufsize,0xffffffff,\n                        (quoting_options *)name);\n      }" if (parenthesized_expression "(0x1fff < sVar6)" ( (binary_expression "0x1fff < sVar6" number_literal < identifier) )) (compound_statement "{\n        local_44 = (byte *)xmalloc(sVar6 + 1);\n        quotearg_buffer((char *)local_44,sVar6 + 1,(char *)bufsize,0xffffffff,\n                        (quoting_options *)name);\n      }" { (expression_statement "local_44 = (byte *)xmalloc(sVar6 + 1);" (assignment_expression "local_44 = (byte *)xmalloc(sVar6 + 1)" identifier = (cast_expression "(byte *)xmalloc(sVar6 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar6 + 1)" identifier (argument_list "(sVar6 + 1)" ( (binary_expression "sVar6 + 1" identifier + number_literal) ))))) ;) (expression_statement "quotearg_buffer((char *)local_44,sVar6 + 1,(char *)bufsize,0xffffffff,\n                        (quoting_options *)name);" (call_expression "quotearg_buffer((char *)local_44,sVar6 + 1,(char *)bufsize,0xffffffff,\n                        (quoting_options *)name)" identifier (argument_list "((char *)local_44,sVar6 + 1,(char *)bufsize,0xffffffff,\n                        (quoting_options *)name)" ( (cast_expression "(char *)local_44" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , (binary_expression "sVar6 + 1" identifier + number_literal) , (cast_expression "(char *)bufsize" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , number_literal , (cast_expression "(quoting_options *)name" ( (type_descriptor "quoting_options *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) })) (expression_statement "local_35 = true;" (assignment_expression "local_35 = true" identifier = true) ;) (if_statement "if (*(byte *)bufsize == *local_44) {\n        sVar7 = strlen((char *)bufsize);\n        local_35 = sVar6 != sVar7;\n      }" if (parenthesized_expression "(*(byte *)bufsize == *local_44)" ( (binary_expression "*(byte *)bufsize == *local_44" (pointer_expression "*(byte *)bufsize" * (cast_expression "(byte *)bufsize" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) == (pointer_expression "*local_44" * identifier)) )) (compound_statement "{\n        sVar7 = strlen((char *)bufsize);\n        local_35 = sVar6 != sVar7;\n      }" { (expression_statement "sVar7 = strlen((char *)bufsize);" (assignment_expression "sVar7 = strlen((char *)bufsize)" identifier = (call_expression "strlen((char *)bufsize)" identifier (argument_list "((char *)bufsize)" ( (cast_expression "(char *)bufsize" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "local_35 = sVar6 != sVar7;" (assignment_expression "local_35 = sVar6 != sVar7" identifier = (binary_expression "sVar6 != sVar7" identifier != identifier)) ;) })) (if_statement "if (bVar4) goto LAB_00015fbc;" if (parenthesized_expression "(bVar4)" ( identifier )) (goto_statement "goto LAB_00015fbc;" goto statement_identifier ;)) }))) (if_statement "if (needs_general_quoting == 0) {\n      if (align_variable_outer_quotes == false) {\n        *(undefined1 *)width = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (cwd_some_quoted ^ 1U | local_35) ^ 1;\n      goto LAB_00016026;\n    }" if (parenthesized_expression "(needs_general_quoting == 0)" ( (binary_expression "needs_general_quoting == 0" identifier == number_literal) )) (compound_statement "{\n      if (align_variable_outer_quotes == false) {\n        *(undefined1 *)width = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (cwd_some_quoted ^ 1U | local_35) ^ 1;\n      goto LAB_00016026;\n    }" { (if_statement "if (align_variable_outer_quotes == false) {\n        *(undefined1 *)width = 0;\n        goto LAB_0001603e;\n      }" if (parenthesized_expression "(align_variable_outer_quotes == false)" ( (binary_expression "align_variable_outer_quotes == false" identifier == false) )) (compound_statement "{\n        *(undefined1 *)width = 0;\n        goto LAB_0001603e;\n      }" { (expression_statement "*(undefined1 *)width = 0;" (assignment_expression "*(undefined1 *)width = 0" (pointer_expression "*(undefined1 *)width" * (cast_expression "(undefined1 *)width" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) (goto_statement "goto LAB_0001603e;" goto statement_identifier ;) })) (labeled_statement "LAB_00016015:\n      bVar14 = (cwd_some_quoted ^ 1U | local_35) ^ 1;" statement_identifier : (expression_statement "bVar14 = (cwd_some_quoted ^ 1U | local_35) ^ 1;" (assignment_expression "bVar14 = (cwd_some_quoted ^ 1U | local_35) ^ 1" identifier = (binary_expression "(cwd_some_quoted ^ 1U | local_35) ^ 1" (parenthesized_expression "(cwd_some_quoted ^ 1U | local_35)" ( (binary_expression "cwd_some_quoted ^ 1U | local_35" (binary_expression "cwd_some_quoted ^ 1U" identifier ^ number_literal) | identifier) )) ^ number_literal)) ;)) (goto_statement "goto LAB_00016026;" goto statement_identifier ;) })) (expression_statement "sVar7 = __ctype_get_mb_cur_max();" (assignment_expression "sVar7 = __ctype_get_mb_cur_max()" identifier = (call_expression "__ctype_get_mb_cur_max()" identifier (argument_list "()" ( )))) ;) (if_statement "if (sVar7 < 2) {\n      if (local_44 < local_44 + sVar6) {\n        ppuVar8 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar8)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + sVar6 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = mbsnwidth((char *)local_44,sVar6,0);\n    }" if (parenthesized_expression "(sVar7 < 2)" ( (binary_expression "sVar7 < 2" identifier < number_literal) )) (compound_statement "{\n      if (local_44 < local_44 + sVar6) {\n        ppuVar8 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar8)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + sVar6 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }" { (if_statement "if (local_44 < local_44 + sVar6) {\n        ppuVar8 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar8)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + sVar6 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }" if (parenthesized_expression "(local_44 < local_44 + sVar6)" ( (binary_expression "local_44 < local_44 + sVar6" identifier < (binary_expression "local_44 + sVar6" identifier + identifier)) )) (compound_statement "{\n        ppuVar8 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar8)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + sVar6 != pbVar12);\n      }" { (expression_statement "ppuVar8 = __ctype_b_loc();" (assignment_expression "ppuVar8 = __ctype_b_loc()" identifier = (call_expression "__ctype_b_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "local_4c = 0;" (assignment_expression "local_4c = 0" identifier = number_literal) ;) (expression_statement "pbVar12 = local_44;" (assignment_expression "pbVar12 = local_44" identifier = identifier) ;) (do_statement "do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar8)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + sVar6 != pbVar12);" do (compound_statement "{\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar8)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        }" { (expression_statement "local_4c = (local_4c + 1) - (uint)(((*ppuVar8)[*pbVar12] & 0x4000) == 0);" (assignment_expression "local_4c = (local_4c + 1) - (uint)(((*ppuVar8)[*pbVar12] & 0x4000) == 0)" identifier = (binary_expression "(local_4c + 1) - (uint)(((*ppuVar8)[*pbVar12] & 0x4000) == 0)" (parenthesized_expression "(local_4c + 1)" ( (binary_expression "local_4c + 1" identifier + number_literal) )) - (call_expression "(uint)(((*ppuVar8)[*pbVar12] & 0x4000) == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(((*ppuVar8)[*pbVar12] & 0x4000) == 0)" ( (binary_expression "((*ppuVar8)[*pbVar12] & 0x4000) == 0" (parenthesized_expression "((*ppuVar8)[*pbVar12] & 0x4000)" ( (binary_expression "(*ppuVar8)[*pbVar12] & 0x4000" (subscript_expression "(*ppuVar8)[*pbVar12]" (parenthesized_expression "(*ppuVar8)" ( (pointer_expression "*ppuVar8" * identifier) )) [ (pointer_expression "*pbVar12" * identifier) ]) & number_literal) )) == number_literal) ))))) ;) (expression_statement "pbVar12 = pbVar12 + 1;" (assignment_expression "pbVar12 = pbVar12 + 1" identifier = (binary_expression "pbVar12 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(local_44 + sVar6 != pbVar12)" ( (binary_expression "local_44 + sVar6 != pbVar12" (binary_expression "local_44 + sVar6" identifier + identifier) != identifier) )) ;) }) (else_clause "else {\n        local_4c = 0;\n      }" else (compound_statement "{\n        local_4c = 0;\n      }" { (expression_statement "local_4c = 0;" (assignment_expression "local_4c = 0" identifier = number_literal) ;) }))) }) (else_clause "else {\n      local_4c = mbsnwidth((char *)local_44,sVar6,0);\n    }" else (compound_statement "{\n      local_4c = mbsnwidth((char *)local_44,sVar6,0);\n    }" { (expression_statement "local_4c = mbsnwidth((char *)local_44,sVar6,0);" (assignment_expression "local_4c = mbsnwidth((char *)local_44,sVar6,0)" identifier = (call_expression "mbsnwidth((char *)local_44,sVar6,0)" identifier (argument_list "((char *)local_44,sVar6,0)" ( (cast_expression "(char *)local_44" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier , number_literal )))) ;) }))) (if_statement "if (align_variable_outer_quotes != false) goto LAB_00016015;" if (parenthesized_expression "(align_variable_outer_quotes != false)" ( (binary_expression "align_variable_outer_quotes != false" identifier != false) )) (goto_statement "goto LAB_00016015;" goto statement_identifier ;)) (expression_statement "*(undefined1 *)width = 0;" (assignment_expression "*(undefined1 *)width = 0" (pointer_expression "*(undefined1 *)width" * (cast_expression "(undefined1 *)width" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) }) (else_clause "else {\n    if (options != (quoting_options *)0x0) {\n      bVar4 = true;\n      goto LAB_00015e76;\n    }\n    sVar6 = strlen((char *)bufsize);\n    if (0x1fff < sVar6) {\n      local_44 = (byte *)xmalloc(sVar6 + 1);\n    }\n    memcpy(local_44,(void *)bufsize,sVar6 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = sVar6;\n    sVar7 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar7 < 2) {\n      sVar6 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar8 = __ctype_b_loc();\n        pbVar10 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40) == 0) {\n            *pbVar10 = 0x3f;\n          }\n          pbVar10 = pbVar10 + 1;\n        } while (pbVar10 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar10 = local_44;\n      do {\n        bVar2 = *pbVar10;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar10 = pbVar10 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          s = pbVar10;\n          do {\n            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);\n            pbVar1 = local_54 + 1;\n            if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar9 = mbsinit((mbstate_t *)&mbstate);\n            s = pbVar10;\n          } while (iVar9 == 0);\n        }\n      } while (pbVar10 < pbVar12);\n      sVar6 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      sVar6 = 0;\n    }\n    bVar14 = align_variable_outer_quotes;\n    if (align_variable_outer_quotes != false) goto LAB_00016015;\nLAB_00016026:\n    *(byte *)width = bVar14;\n    if (needs_general_quoting == 0) goto LAB_0001603e;\n  }" else (compound_statement "{\n    if (options != (quoting_options *)0x0) {\n      bVar4 = true;\n      goto LAB_00015e76;\n    }\n    sVar6 = strlen((char *)bufsize);\n    if (0x1fff < sVar6) {\n      local_44 = (byte *)xmalloc(sVar6 + 1);\n    }\n    memcpy(local_44,(void *)bufsize,sVar6 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = sVar6;\n    sVar7 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar7 < 2) {\n      sVar6 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar8 = __ctype_b_loc();\n        pbVar10 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40) == 0) {\n            *pbVar10 = 0x3f;\n          }\n          pbVar10 = pbVar10 + 1;\n        } while (pbVar10 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar10 = local_44;\n      do {\n        bVar2 = *pbVar10;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar10 = pbVar10 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          s = pbVar10;\n          do {\n            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);\n            pbVar1 = local_54 + 1;\n            if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar9 = mbsinit((mbstate_t *)&mbstate);\n            s = pbVar10;\n          } while (iVar9 == 0);\n        }\n      } while (pbVar10 < pbVar12);\n      sVar6 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      sVar6 = 0;\n    }\n    bVar14 = align_variable_outer_quotes;\n    if (align_variable_outer_quotes != false) goto LAB_00016015;\nLAB_00016026:\n    *(byte *)width = bVar14;\n    if (needs_general_quoting == 0) goto LAB_0001603e;\n  }" { (if_statement "if (options != (quoting_options *)0x0) {\n      bVar4 = true;\n      goto LAB_00015e76;\n    }" if (parenthesized_expression "(options != (quoting_options *)0x0)" ( (binary_expression "options != (quoting_options *)0x0" identifier != (cast_expression "(quoting_options *)0x0" ( (type_descriptor "quoting_options *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      bVar4 = true;\n      goto LAB_00015e76;\n    }" { (expression_statement "bVar4 = true;" (assignment_expression "bVar4 = true" identifier = true) ;) (goto_statement "goto LAB_00015e76;" goto statement_identifier ;) })) (expression_statement "sVar6 = strlen((char *)bufsize);" (assignment_expression "sVar6 = strlen((char *)bufsize)" identifier = (call_expression "strlen((char *)bufsize)" identifier (argument_list "((char *)bufsize)" ( (cast_expression "(char *)bufsize" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if (0x1fff < sVar6) {\n      local_44 = (byte *)xmalloc(sVar6 + 1);\n    }" if (parenthesized_expression "(0x1fff < sVar6)" ( (binary_expression "0x1fff < sVar6" number_literal < identifier) )) (compound_statement "{\n      local_44 = (byte *)xmalloc(sVar6 + 1);\n    }" { (expression_statement "local_44 = (byte *)xmalloc(sVar6 + 1);" (assignment_expression "local_44 = (byte *)xmalloc(sVar6 + 1)" identifier = (cast_expression "(byte *)xmalloc(sVar6 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar6 + 1)" identifier (argument_list "(sVar6 + 1)" ( (binary_expression "sVar6 + 1" identifier + number_literal) ))))) ;) })) (expression_statement "memcpy(local_44,(void *)bufsize,sVar6 + 1);" (call_expression "memcpy(local_44,(void *)bufsize,sVar6 + 1)" identifier (argument_list "(local_44,(void *)bufsize,sVar6 + 1)" ( identifier , (cast_expression "(void *)bufsize" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , (binary_expression "sVar6 + 1" identifier + number_literal) ))) ;) (expression_statement "local_35 = false;" (assignment_expression "local_35 = false" identifier = false) ;) (labeled_statement "LAB_00015fbc:\n    local_4c = sVar6;" statement_identifier : (expression_statement "local_4c = sVar6;" (assignment_expression "local_4c = sVar6" identifier = identifier) ;)) (expression_statement "sVar7 = __ctype_get_mb_cur_max();" (assignment_expression "sVar7 = __ctype_get_mb_cur_max()" identifier = (call_expression "__ctype_get_mb_cur_max()" identifier (argument_list "()" ( )))) ;) (expression_statement "pbVar12 = local_44 + local_4c;" (assignment_expression "pbVar12 = local_44 + local_4c" identifier = (binary_expression "local_44 + local_4c" identifier + identifier)) ;) (if_statement "if (sVar7 < 2) {\n      sVar6 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar8 = __ctype_b_loc();\n        pbVar10 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40) == 0) {\n            *pbVar10 = 0x3f;\n          }\n          pbVar10 = pbVar10 + 1;\n        } while (pbVar10 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar10 = local_44;\n      do {\n        bVar2 = *pbVar10;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar10 = pbVar10 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          s = pbVar10;\n          do {\n            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);\n            pbVar1 = local_54 + 1;\n            if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar9 = mbsinit((mbstate_t *)&mbstate);\n            s = pbVar10;\n          } while (iVar9 == 0);\n        }\n      } while (pbVar10 < pbVar12);\n      sVar6 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      sVar6 = 0;\n    }" if (parenthesized_expression "(sVar7 < 2)" ( (binary_expression "sVar7 < 2" identifier < number_literal) )) (compound_statement "{\n      sVar6 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar8 = __ctype_b_loc();\n        pbVar10 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40) == 0) {\n            *pbVar10 = 0x3f;\n          }\n          pbVar10 = pbVar10 + 1;\n        } while (pbVar10 != pbVar12);\n      }\n    }" { (expression_statement "sVar6 = local_4c;" (assignment_expression "sVar6 = local_4c" identifier = identifier) ;) (if_statement "if (local_44 < pbVar12) {\n        ppuVar8 = __ctype_b_loc();\n        pbVar10 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40) == 0) {\n            *pbVar10 = 0x3f;\n          }\n          pbVar10 = pbVar10 + 1;\n        } while (pbVar10 != pbVar12);\n      }" if (parenthesized_expression "(local_44 < pbVar12)" ( (binary_expression "local_44 < pbVar12" identifier < identifier) )) (compound_statement "{\n        ppuVar8 = __ctype_b_loc();\n        pbVar10 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40) == 0) {\n            *pbVar10 = 0x3f;\n          }\n          pbVar10 = pbVar10 + 1;\n        } while (pbVar10 != pbVar12);\n      }" { (expression_statement "ppuVar8 = __ctype_b_loc();" (assignment_expression "ppuVar8 = __ctype_b_loc()" identifier = (call_expression "__ctype_b_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "pbVar10 = local_44;" (assignment_expression "pbVar10 = local_44" identifier = identifier) ;) (do_statement "do {\n          if ((*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40) == 0) {\n            *pbVar10 = 0x3f;\n          }\n          pbVar10 = pbVar10 + 1;\n        } while (pbVar10 != pbVar12);" do (compound_statement "{\n          if ((*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40) == 0) {\n            *pbVar10 = 0x3f;\n          }\n          pbVar10 = pbVar10 + 1;\n        }" { (if_statement "if ((*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40) == 0) {\n            *pbVar10 = 0x3f;\n          }" if (parenthesized_expression "((*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40) == 0)" ( (binary_expression "(*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40) == 0" (parenthesized_expression "(*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40)" ( (binary_expression "*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1) & 0x40" (pointer_expression "*(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1)" * (cast_expression "(byte *)((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)*ppuVar8 + (uint)*pbVar10 * 2 + 1)" ( (binary_expression "(int)*ppuVar8 + (uint)*pbVar10 * 2 + 1" (binary_expression "(int)*ppuVar8 + (uint)*pbVar10 * 2" (cast_expression "(int)*ppuVar8" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*ppuVar8" * identifier)) + (binary_expression "(uint)*pbVar10 * 2" (binary_expression "(uint)*pbVar10" (parenthesized_expression "(uint)" ( identifier )) * identifier) * number_literal)) + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n            *pbVar10 = 0x3f;\n          }" { (expression_statement "*pbVar10 = 0x3f;" (assignment_expression "*pbVar10 = 0x3f" (pointer_expression "*pbVar10" * identifier) = number_literal) ;) })) (expression_statement "pbVar10 = pbVar10 + 1;" (assignment_expression "pbVar10 = pbVar10 + 1" identifier = (binary_expression "pbVar10 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pbVar10 != pbVar12)" ( (binary_expression "pbVar10 != pbVar12" identifier != identifier) )) ;) })) }) (else_clause "else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar10 = local_44;\n      do {\n        bVar2 = *pbVar10;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar10 = pbVar10 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          s = pbVar10;\n          do {\n            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);\n            pbVar1 = local_54 + 1;\n            if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar9 = mbsinit((mbstate_t *)&mbstate);\n            s = pbVar10;\n          } while (iVar9 == 0);\n        }\n      } while (pbVar10 < pbVar12);\n      sVar6 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      sVar6 = 0;\n    }" else (if_statement "if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar10 = local_44;\n      do {\n        bVar2 = *pbVar10;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar10 = pbVar10 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          s = pbVar10;\n          do {\n            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);\n            pbVar1 = local_54 + 1;\n            if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar9 = mbsinit((mbstate_t *)&mbstate);\n            s = pbVar10;\n          } while (iVar9 == 0);\n        }\n      } while (pbVar10 < pbVar12);\n      sVar6 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      sVar6 = 0;\n    }" if (parenthesized_expression "(local_44 < pbVar12)" ( (binary_expression "local_44 < pbVar12" identifier < identifier) )) (compound_statement "{\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar10 = local_44;\n      do {\n        bVar2 = *pbVar10;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar10 = pbVar10 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          s = pbVar10;\n          do {\n            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);\n            pbVar1 = local_54 + 1;\n            if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar9 = mbsinit((mbstate_t *)&mbstate);\n            s = pbVar10;\n          } while (iVar9 == 0);\n        }\n      } while (pbVar10 < pbVar12);\n      sVar6 = (int)local_54 - (int)local_44;\n    }" { (expression_statement "local_4c = 0;" (assignment_expression "local_4c = 0" identifier = number_literal) ;) (expression_statement "local_54 = local_44;" (assignment_expression "local_54 = local_44" identifier = identifier) ;) (expression_statement "pbVar10 = local_44;" (assignment_expression "pbVar10 = local_44" identifier = identifier) ;) (do_statement "do {\n        bVar2 = *pbVar10;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar10 = pbVar10 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          s = pbVar10;\n          do {\n            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);\n            pbVar1 = local_54 + 1;\n            if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar9 = mbsinit((mbstate_t *)&mbstate);\n            s = pbVar10;\n          } while (iVar9 == 0);\n        }\n      } while (pbVar10 < pbVar12);" do (compound_statement "{\n        bVar2 = *pbVar10;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar10 = pbVar10 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          s = pbVar10;\n          do {\n            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);\n            pbVar1 = local_54 + 1;\n            if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar9 = mbsinit((mbstate_t *)&mbstate);\n            s = pbVar10;\n          } while (iVar9 == 0);\n        }\n      }" { (expression_statement "bVar2 = *pbVar10;" (assignment_expression "bVar2 = *pbVar10" identifier = (pointer_expression "*pbVar10" * identifier)) ;) (if_statement "if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar10 = pbVar10 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          s = pbVar10;\n          do {\n            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);\n            pbVar1 = local_54 + 1;\n            if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar9 = mbsinit((mbstate_t *)&mbstate);\n            s = pbVar10;\n          } while (iVar9 == 0);\n        }" if (parenthesized_expression "((char)bVar2 < '@')" ( (binary_expression "(char)bVar2 < '@'" (cast_expression "(char)bVar2" ( (type_descriptor "char" primitive_type) ) identifier) < (char_literal "'@'" ' character ')) )) (compound_statement "{\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar10 = pbVar10 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }" { (if_statement "if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;" if (parenthesized_expression "(((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20)))" ( (binary_expression "((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))" (parenthesized_expression "((char)bVar2 < '%')" ( (binary_expression "(char)bVar2 < '%'" (cast_expression "(char)bVar2" ( (type_descriptor "char" primitive_type) ) identifier) < (char_literal "'%'" ' character ')) )) && (parenthesized_expression "(3 < (byte)(bVar2 - 0x20))" ( (binary_expression "3 < (byte)(bVar2 - 0x20)" number_literal < (call_expression "(byte)(bVar2 - 0x20)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar2 - 0x20)" ( (binary_expression "bVar2 - 0x20" identifier - number_literal) )))) ))) )) (goto_statement "goto LAB_000160d2;" goto statement_identifier ;)) (labeled_statement "LAB_0001609c:\n          local_4c = local_4c + 1;" statement_identifier : (expression_statement "local_4c = local_4c + 1;" (assignment_expression "local_4c = local_4c + 1" identifier = (binary_expression "local_4c + 1" identifier + number_literal)) ;)) (expression_statement "pbVar10 = pbVar10 + 1;" (assignment_expression "pbVar10 = pbVar10 + 1" identifier = (binary_expression "pbVar10 + 1" identifier + number_literal)) ;) (expression_statement "*local_54 = bVar2;" (assignment_expression "*local_54 = bVar2" (pointer_expression "*local_54" * identifier) = identifier) ;) (expression_statement "local_54 = local_54 + 1;" (assignment_expression "local_54 = local_54 + 1" identifier = (binary_expression "local_54 + 1" identifier + number_literal)) ;) }) (else_clause "else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          s = pbVar10;\n          do {\n            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);\n            pbVar1 = local_54 + 1;\n            if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar9 = mbsinit((mbstate_t *)&mbstate);\n            s = pbVar10;\n          } while (iVar9 == 0);\n        }" else (compound_statement "{\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          mbstate.__count = 0;\n          mbstate.__value.__wch = 0;\n          s = pbVar10;\n          do {\n            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);\n            pbVar1 = local_54 + 1;\n            if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar9 = mbsinit((mbstate_t *)&mbstate);\n            s = pbVar10;\n          } while (iVar9 == 0);\n        }" { (if_statement "if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;" if (parenthesized_expression "(('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))" ( (binary_expression "('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e)))" (parenthesized_expression "('@' < (char)bVar2)" ( (binary_expression "'@' < (char)bVar2" (char_literal "'@'" ' character ') < (cast_expression "(char)bVar2" ( (type_descriptor "char" primitive_type) ) identifier)) )) && (parenthesized_expression "(((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e)))" ( (parenthesized_expression "((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))" ( (binary_expression "(char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e)" (binary_expression "(char)bVar2 < '`'" (cast_expression "(char)bVar2" ( (type_descriptor "char" primitive_type) ) identifier) < (char_literal "'`'" ' character ')) || (parenthesized_expression "((byte)(bVar2 + 0x9f) < 0x1e)" ( (binary_expression "(byte)(bVar2 + 0x9f) < 0x1e" (call_expression "(byte)(bVar2 + 0x9f)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar2 + 0x9f)" ( (binary_expression "bVar2 + 0x9f" identifier + number_literal) ))) < number_literal) ))) )) ))) )) (goto_statement "goto LAB_0001609c;" goto statement_identifier ;)) (labeled_statement "LAB_000160d2:\n          mbstate.__count = 0;" statement_identifier : (expression_statement "mbstate.__count = 0;" (assignment_expression "mbstate.__count = 0" (field_expression "mbstate.__count" identifier . field_identifier) = number_literal) ;)) (expression_statement "mbstate.__value.__wch = 0;" (assignment_expression "mbstate.__value.__wch = 0" (field_expression "mbstate.__value.__wch" (field_expression "mbstate.__value" identifier . field_identifier) . field_identifier) = number_literal) ;) (expression_statement "s = pbVar10;" (assignment_expression "s = pbVar10" identifier = identifier) ;) (do_statement "do {\n            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);\n            pbVar1 = local_54 + 1;\n            if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar9 = mbsinit((mbstate_t *)&mbstate);\n            s = pbVar10;\n          } while (iVar9 == 0);" do (compound_statement "{\n            sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);\n            pbVar1 = local_54 + 1;\n            if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar9 = mbsinit((mbstate_t *)&mbstate);\n            s = pbVar10;\n          }" { (expression_statement "sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate);" (assignment_expression "sVar6 = rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate)" identifier = (call_expression "rpl_mbrtowc(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate)" identifier (argument_list "(&wc,(char *)s,(int)pbVar12 - (int)s,&mbstate)" ( (pointer_expression "&wc" & identifier) , (cast_expression "(char *)s" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , (binary_expression "(int)pbVar12 - (int)s" (cast_expression "(int)pbVar12" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)s" ( (type_descriptor "int" primitive_type) ) identifier)) , (pointer_expression "&mbstate" & identifier) )))) ;) (expression_statement "pbVar1 = local_54 + 1;" (assignment_expression "pbVar1 = local_54 + 1" identifier = (binary_expression "local_54 + 1" identifier + number_literal)) ;) (if_statement "if (sVar6 == 0xffffffff) {\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }" if (parenthesized_expression "(sVar6 == 0xffffffff)" ( (binary_expression "sVar6 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n              pbVar10 = s + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }" { (expression_statement "pbVar10 = s + 1;" (assignment_expression "pbVar10 = s + 1" identifier = (binary_expression "s + 1" identifier + number_literal)) ;) (expression_statement "*local_54 = 0x3f;" (assignment_expression "*local_54 = 0x3f" (pointer_expression "*local_54" * identifier) = number_literal) ;) (labeled_statement "LAB_000161e7:\n              local_4c = local_4c + 1;" statement_identifier : (expression_statement "local_4c = local_4c + 1;" (assignment_expression "local_4c = local_4c + 1" identifier = (binary_expression "local_4c + 1" identifier + number_literal)) ;)) (expression_statement "local_54 = pbVar1;" (assignment_expression "local_54 = pbVar1" identifier = identifier) ;) (break_statement "break;" break ;) })) (if_statement "if (sVar6 == 0xfffffffe) {\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }" if (parenthesized_expression "(sVar6 == 0xfffffffe)" ( (binary_expression "sVar6 == 0xfffffffe" identifier == number_literal) )) (compound_statement "{\n              *local_54 = 0x3f;\n              pbVar10 = pbVar12;\n              goto LAB_000161e7;\n            }" { (expression_statement "*local_54 = 0x3f;" (assignment_expression "*local_54 = 0x3f" (pointer_expression "*local_54" * identifier) = number_literal) ;) (expression_statement "pbVar10 = pbVar12;" (assignment_expression "pbVar10 = pbVar12" identifier = identifier) ;) (goto_statement "goto LAB_000161e7;" goto statement_identifier ;) })) (if_statement "if (sVar6 == 0) {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }\n            else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }" if (parenthesized_expression "(sVar6 == 0)" ( (binary_expression "sVar6 == 0" identifier == number_literal) )) (compound_statement "{\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + 1;\n              if (iVar9 < 0) goto LAB_000160ff;\n              *local_54 = *s;\n              pbVar11 = pbVar10;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar9;\n              pbVar10 = pbVar11;\n            }" { (expression_statement "iVar9 = wcwidth(wc);" (assignment_expression "iVar9 = wcwidth(wc)" identifier = (call_expression "wcwidth(wc)" identifier (argument_list "(wc)" ( identifier )))) ;) (expression_statement "pbVar10 = s + 1;" (assignment_expression "pbVar10 = s + 1" identifier = (binary_expression "s + 1" identifier + number_literal)) ;) (if_statement "if (iVar9 < 0) goto LAB_000160ff;" if (parenthesized_expression "(iVar9 < 0)" ( (binary_expression "iVar9 < 0" identifier < number_literal) )) (goto_statement "goto LAB_000160ff;" goto statement_identifier ;)) (expression_statement "*local_54 = *s;" (assignment_expression "*local_54 = *s" (pointer_expression "*local_54" * identifier) = (pointer_expression "*s" * identifier)) ;) (expression_statement "pbVar11 = pbVar10;" (assignment_expression "pbVar11 = pbVar10" identifier = identifier) ;) (expression_statement "local_54 = pbVar1;" (assignment_expression "local_54 = pbVar1" identifier = identifier) ;) (labeled_statement "LAB_00016181:\n              local_4c = local_4c + iVar9;" statement_identifier : (expression_statement "local_4c = local_4c + iVar9;" (assignment_expression "local_4c = local_4c + iVar9" identifier = (binary_expression "local_4c + iVar9" identifier + identifier)) ;)) (expression_statement "pbVar10 = pbVar11;" (assignment_expression "pbVar10 = pbVar11" identifier = identifier) ;) }) (else_clause "else {\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }" else (compound_statement "{\n              iVar9 = wcwidth(wc);\n              pbVar10 = s + sVar6;\n              pbVar13 = local_54;\n              if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }" { (expression_statement "iVar9 = wcwidth(wc);" (assignment_expression "iVar9 = wcwidth(wc)" identifier = (call_expression "wcwidth(wc)" identifier (argument_list "(wc)" ( identifier )))) ;) (expression_statement "pbVar10 = s + sVar6;" (assignment_expression "pbVar10 = s + sVar6" identifier = (binary_expression "s + sVar6" identifier + identifier)) ;) (expression_statement "pbVar13 = local_54;" (assignment_expression "pbVar13 = local_54" identifier = identifier) ;) (if_statement "if (-1 < iVar9) {\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }" if (parenthesized_expression "(-1 < iVar9)" ( (binary_expression "-1 < iVar9" number_literal < identifier) )) (compound_statement "{\n                do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);\n                local_54 = local_54 + sVar6;\n                goto LAB_00016181;\n              }" { (do_statement "do {\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar11 != pbVar10);" do (compound_statement "{\n                  pbVar11 = s + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *s;\n                  s = pbVar11;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                }" { (expression_statement "pbVar11 = s + (uint)bVar14 * -2 + 1;" (assignment_expression "pbVar11 = s + (uint)bVar14 * -2 + 1" identifier = (binary_expression "s + (uint)bVar14 * -2 + 1" (binary_expression "s + (uint)bVar14 * -2" identifier + (binary_expression "(uint)bVar14 * -2" (cast_expression "(uint)bVar14" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "*pbVar13 = *s;" (assignment_expression "*pbVar13 = *s" (pointer_expression "*pbVar13" * identifier) = (pointer_expression "*s" * identifier)) ;) (expression_statement "s = pbVar11;" (assignment_expression "s = pbVar11" identifier = identifier) ;) (expression_statement "pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;" (assignment_expression "pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1" identifier = (binary_expression "pbVar13 + (uint)bVar14 * -2 + 1" (binary_expression "pbVar13 + (uint)bVar14 * -2" identifier + (binary_expression "(uint)bVar14 * -2" (cast_expression "(uint)bVar14" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(pbVar11 != pbVar10)" ( (binary_expression "pbVar11 != pbVar10" identifier != identifier) )) ;) (expression_statement "local_54 = local_54 + sVar6;" (assignment_expression "local_54 = local_54 + sVar6" identifier = (binary_expression "local_54 + sVar6" identifier + identifier)) ;) (goto_statement "goto LAB_00016181;" goto statement_identifier ;) })) (labeled_statement "LAB_000160ff:\n              local_4c = local_4c + 1;" statement_identifier : (expression_statement "local_4c = local_4c + 1;" (assignment_expression "local_4c = local_4c + 1" identifier = (binary_expression "local_4c + 1" identifier + number_literal)) ;)) (expression_statement "*local_54 = 0x3f;" (assignment_expression "*local_54 = 0x3f" (pointer_expression "*local_54" * identifier) = number_literal) ;) (expression_statement "local_54 = pbVar1;" (assignment_expression "local_54 = pbVar1" identifier = identifier) ;) }))) (expression_statement "iVar9 = mbsinit((mbstate_t *)&mbstate);" (assignment_expression "iVar9 = mbsinit((mbstate_t *)&mbstate)" identifier = (call_expression "mbsinit((mbstate_t *)&mbstate)" identifier (argument_list "((mbstate_t *)&mbstate)" ( (cast_expression "(mbstate_t *)&mbstate" ( (type_descriptor "mbstate_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&mbstate" & identifier)) )))) ;) (expression_statement "s = pbVar10;" (assignment_expression "s = pbVar10" identifier = identifier) ;) }) while (parenthesized_expression "(iVar9 == 0)" ( (binary_expression "iVar9 == 0" identifier == number_literal) )) ;) }))) }) while (parenthesized_expression "(pbVar10 < pbVar12)" ( (binary_expression "pbVar10 < pbVar12" identifier < identifier) )) ;) (expression_statement "sVar6 = (int)local_54 - (int)local_44;" (assignment_expression "sVar6 = (int)local_54 - (int)local_44" identifier = (binary_expression "(int)local_54 - (int)local_44" (cast_expression "(int)local_54" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)local_44" ( (type_descriptor "int" primitive_type) ) identifier))) ;) }) (else_clause "else {\n      local_4c = 0;\n      sVar6 = 0;\n    }" else (compound_statement "{\n      local_4c = 0;\n      sVar6 = 0;\n    }" { (expression_statement "local_4c = 0;" (assignment_expression "local_4c = 0" identifier = number_literal) ;) (expression_statement "sVar6 = 0;" (assignment_expression "sVar6 = 0" identifier = number_literal) ;) }))))) (expression_statement "bVar14 = align_variable_outer_quotes;" (assignment_expression "bVar14 = align_variable_outer_quotes" identifier = identifier) ;) (if_statement "if (align_variable_outer_quotes != false) goto LAB_00016015;" if (parenthesized_expression "(align_variable_outer_quotes != false)" ( (binary_expression "align_variable_outer_quotes != false" identifier != false) )) (goto_statement "goto LAB_00016015;" goto statement_identifier ;)) (labeled_statement "LAB_00016026:\n    *(byte *)width = bVar14;" statement_identifier : (expression_statement "*(byte *)width = bVar14;" (assignment_expression "*(byte *)width = bVar14" (pointer_expression "*(byte *)width" * (cast_expression "(byte *)width" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = identifier) ;)) (if_statement "if (needs_general_quoting == 0) goto LAB_0001603e;" if (parenthesized_expression "(needs_general_quoting == 0)" ( (binary_expression "needs_general_quoting == 0" identifier == number_literal) )) (goto_statement "goto LAB_0001603e;" goto statement_identifier ;)) }))) (expression_statement "*(size_t *)needs_general_quoting = local_4c;" (assignment_expression "*(size_t *)needs_general_quoting = local_4c" (pointer_expression "*(size_t *)needs_general_quoting" * (cast_expression "(size_t *)needs_general_quoting" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) = identifier) ;) (labeled_statement "LAB_0001603e:\n  *inbuf = (char *)local_44;" statement_identifier : (expression_statement "*inbuf = (char *)local_44;" (assignment_expression "*inbuf = (char *)local_44" (pointer_expression "*inbuf" * identifier) = (cast_expression "(char *)local_44" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;)) (if_statement "if (iVar3 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(iVar3 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar3 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return sVar6;" return identifier ;) })))
(translation_unit "uint __regparm3\nFUN_00015e10(undefined4 *param_1,byte *param_2,undefined4 param_3,int param_4,uint *param_5,\n            byte *param_6)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  bool bVar3;\n  uint uVar4;\n  size_t sVar5;\n  ushort **ppuVar6;\n  int iVar7;\n  int iVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  byte *pbVar12;\n  byte *pbVar13;\n  int in_GS_OFFSET;\n  byte bVar14;\n  byte *local_54;\n  uint local_4c;\n  byte *local_44;\n  bool local_35;\n  wchar_t local_2c;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  byte *pbVar11;\n  \n  bVar14 = 0;\n  uStack_14 = 0x15e1d;\n  local_44 = (byte *)*param_1;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar4 = FUN_00022de0(param_3);\n  if ((uVar4 < 3 & DAT_0003c2bc) == 0) {\n    bVar3 = false;\n    if (param_4 == 0) {\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }\n    else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }\n    if (param_5 == (uint *)0x0) {\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar5 = __ctype_get_mb_cur_max();\n    if (sVar5 < 2) {\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }\n    if (DAT_0003c354 != 0) goto LAB_00016015;\n    *param_6 = 0;\n  }\n  else {\n    if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }\n    uVar4 = strlen((char *)param_2);\n    if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }\n    memcpy(local_44,param_2,uVar4 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = uVar4;\n    sVar5 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }\n    bVar14 = DAT_0003c354;\n    if (DAT_0003c354 != 0) goto LAB_00016015;\nLAB_00016026:\n    *param_6 = bVar14;\n    if (param_5 == (uint *)0x0) goto LAB_0001603e;\n  }\n  *param_5 = local_4c;\nLAB_0001603e:\n  *param_1 = local_44;\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b190();\n  }\n  return uVar4;\n}\n\n" (function_definition "uint __regparm3\nFUN_00015e10(undefined4 *param_1,byte *param_2,undefined4 param_3,int param_4,uint *param_5,\n            byte *param_6)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  bool bVar3;\n  uint uVar4;\n  size_t sVar5;\n  ushort **ppuVar6;\n  int iVar7;\n  int iVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  byte *pbVar12;\n  byte *pbVar13;\n  int in_GS_OFFSET;\n  byte bVar14;\n  byte *local_54;\n  uint local_4c;\n  byte *local_44;\n  bool local_35;\n  wchar_t local_2c;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  byte *pbVar11;\n  \n  bVar14 = 0;\n  uStack_14 = 0x15e1d;\n  local_44 = (byte *)*param_1;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar4 = FUN_00022de0(param_3);\n  if ((uVar4 < 3 & DAT_0003c2bc) == 0) {\n    bVar3 = false;\n    if (param_4 == 0) {\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }\n    else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }\n    if (param_5 == (uint *)0x0) {\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar5 = __ctype_get_mb_cur_max();\n    if (sVar5 < 2) {\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }\n    if (DAT_0003c354 != 0) goto LAB_00016015;\n    *param_6 = 0;\n  }\n  else {\n    if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }\n    uVar4 = strlen((char *)param_2);\n    if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }\n    memcpy(local_44,param_2,uVar4 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = uVar4;\n    sVar5 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }\n    bVar14 = DAT_0003c354;\n    if (DAT_0003c354 != 0) goto LAB_00016015;\nLAB_00016026:\n    *param_6 = bVar14;\n    if (param_5 == (uint *)0x0) goto LAB_0001603e;\n  }\n  *param_5 = local_4c;\nLAB_0001603e:\n  *param_1 = local_44;\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b190();\n  }\n  return uVar4;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00015e10(undefined4 *param_1,byte *param_2,undefined4 param_3,int param_4,uint *param_5,\n            byte *param_6)" identifier (parameter_list "(undefined4 *param_1,byte *param_2,undefined4 param_3,int param_4,uint *param_5,\n            byte *param_6)" ( (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 "undefined4 param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "uint *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "byte *param_6" type_identifier (pointer_declarator "*param_6" * identifier)) ))) (compound_statement "{\n  byte *pbVar1;\n  byte bVar2;\n  bool bVar3;\n  uint uVar4;\n  size_t sVar5;\n  ushort **ppuVar6;\n  int iVar7;\n  int iVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  byte *pbVar12;\n  byte *pbVar13;\n  int in_GS_OFFSET;\n  byte bVar14;\n  byte *local_54;\n  uint local_4c;\n  byte *local_44;\n  bool local_35;\n  wchar_t local_2c;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  byte *pbVar11;\n  \n  bVar14 = 0;\n  uStack_14 = 0x15e1d;\n  local_44 = (byte *)*param_1;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar4 = FUN_00022de0(param_3);\n  if ((uVar4 < 3 & DAT_0003c2bc) == 0) {\n    bVar3 = false;\n    if (param_4 == 0) {\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }\n    else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }\n    if (param_5 == (uint *)0x0) {\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar5 = __ctype_get_mb_cur_max();\n    if (sVar5 < 2) {\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }\n    if (DAT_0003c354 != 0) goto LAB_00016015;\n    *param_6 = 0;\n  }\n  else {\n    if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }\n    uVar4 = strlen((char *)param_2);\n    if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }\n    memcpy(local_44,param_2,uVar4 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = uVar4;\n    sVar5 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }\n    bVar14 = DAT_0003c354;\n    if (DAT_0003c354 != 0) goto LAB_00016015;\nLAB_00016026:\n    *param_6 = bVar14;\n    if (param_5 == (uint *)0x0) goto LAB_0001603e;\n  }\n  *param_5 = local_4c;\nLAB_0001603e:\n  *param_1 = local_44;\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b190();\n  }\n  return uVar4;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "ushort **ppuVar6;" type_identifier (pointer_declarator "**ppuVar6" * (pointer_declarator "*ppuVar6" * identifier)) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "byte *pbVar9;" type_identifier (pointer_declarator "*pbVar9" * identifier) ;) (declaration "byte *pbVar10;" type_identifier (pointer_declarator "*pbVar10" * identifier) ;) (declaration "byte *pbVar12;" type_identifier (pointer_declarator "*pbVar12" * identifier) ;) (declaration "byte *pbVar13;" type_identifier (pointer_declarator "*pbVar13" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "byte bVar14;" type_identifier identifier ;) (declaration "byte *local_54;" type_identifier (pointer_declarator "*local_54" * identifier) ;) (declaration "uint local_4c;" type_identifier identifier ;) (declaration "byte *local_44;" type_identifier (pointer_declarator "*local_44" * identifier) ;) (declaration "bool local_35;" primitive_type identifier ;) (declaration "wchar_t local_2c;" type_identifier identifier ;) (declaration "mbstate_t local_28;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (declaration "byte *pbVar11;" type_identifier (pointer_declarator "*pbVar11" * identifier) ;) (expression_statement "bVar14 = 0;" (assignment_expression "bVar14 = 0" identifier = number_literal) ;) (expression_statement "uStack_14 = 0x15e1d;" (assignment_expression "uStack_14 = 0x15e1d" identifier = number_literal) ;) (expression_statement "local_44 = (byte *)*param_1;" (assignment_expression "local_44 = (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_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar4 = FUN_00022de0(param_3);" (assignment_expression "uVar4 = FUN_00022de0(param_3)" identifier = (call_expression "FUN_00022de0(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (if_statement "if ((uVar4 < 3 & DAT_0003c2bc) == 0) {\n    bVar3 = false;\n    if (param_4 == 0) {\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }\n    else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }\n    if (param_5 == (uint *)0x0) {\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar5 = __ctype_get_mb_cur_max();\n    if (sVar5 < 2) {\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }\n    if (DAT_0003c354 != 0) goto LAB_00016015;\n    *param_6 = 0;\n  }\n  else {\n    if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }\n    uVar4 = strlen((char *)param_2);\n    if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }\n    memcpy(local_44,param_2,uVar4 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = uVar4;\n    sVar5 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }\n    bVar14 = DAT_0003c354;\n    if (DAT_0003c354 != 0) goto LAB_00016015;\nLAB_00016026:\n    *param_6 = bVar14;\n    if (param_5 == (uint *)0x0) goto LAB_0001603e;\n  }" if (parenthesized_expression "((uVar4 < 3 & DAT_0003c2bc) == 0)" ( (binary_expression "(uVar4 < 3 & DAT_0003c2bc) == 0" (parenthesized_expression "(uVar4 < 3 & DAT_0003c2bc)" ( (binary_expression "uVar4 < 3 & DAT_0003c2bc" (binary_expression "uVar4 < 3" identifier < number_literal) & identifier) )) == number_literal) )) (compound_statement "{\n    bVar3 = false;\n    if (param_4 == 0) {\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }\n    else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }\n    if (param_5 == (uint *)0x0) {\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar5 = __ctype_get_mb_cur_max();\n    if (sVar5 < 2) {\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }\n    if (DAT_0003c354 != 0) goto LAB_00016015;\n    *param_6 = 0;\n  }" { (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;) (if_statement "if (param_4 == 0) {\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }\n    else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }" if (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }" { (expression_statement "uVar4 = strlen((char *)param_2);" (assignment_expression "uVar4 = strlen((char *)param_2)" identifier = (call_expression "strlen((char *)param_2)" identifier (argument_list "((char *)param_2)" ( (cast_expression "(char *)param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "local_35 = false;" (assignment_expression "local_35 = false" identifier = false) ;) (expression_statement "local_44 = param_2;" (assignment_expression "local_44 = param_2" identifier = identifier) ;) }) (else_clause "else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }" else (compound_statement "{\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }" { (labeled_statement "LAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);" statement_identifier : (expression_statement "uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);" (assignment_expression "uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3)" identifier = (call_expression "FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3)" identifier (argument_list "(local_44,0x2000,param_2,0xffffffff,param_3)" ( identifier , number_literal , identifier , number_literal , identifier )))) ;)) (if_statement "if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }" if (parenthesized_expression "(0x1fff < uVar4)" ( (binary_expression "0x1fff < uVar4" number_literal < identifier) )) (compound_statement "{\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }" { (expression_statement "local_44 = (byte *)FUN_00023f30(uVar4 + 1);" (assignment_expression "local_44 = (byte *)FUN_00023f30(uVar4 + 1)" identifier = (cast_expression "(byte *)FUN_00023f30(uVar4 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00023f30(uVar4 + 1)" identifier (argument_list "(uVar4 + 1)" ( (binary_expression "uVar4 + 1" identifier + number_literal) ))))) ;) (expression_statement "FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);" (call_expression "FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3)" identifier (argument_list "(local_44,uVar4 + 1,param_2,0xffffffff,param_3)" ( identifier , (binary_expression "uVar4 + 1" identifier + number_literal) , identifier , number_literal , identifier ))) ;) })) (expression_statement "local_35 = true;" (assignment_expression "local_35 = true" identifier = true) ;) (if_statement "if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }" if (parenthesized_expression "(*param_2 == *local_44)" ( (binary_expression "*param_2 == *local_44" (pointer_expression "*param_2" * identifier) == (pointer_expression "*local_44" * identifier)) )) (compound_statement "{\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }" { (expression_statement "sVar5 = strlen((char *)param_2);" (assignment_expression "sVar5 = strlen((char *)param_2)" identifier = (call_expression "strlen((char *)param_2)" identifier (argument_list "((char *)param_2)" ( (cast_expression "(char *)param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "local_35 = uVar4 != sVar5;" (assignment_expression "local_35 = uVar4 != sVar5" identifier = (binary_expression "uVar4 != sVar5" identifier != identifier)) ;) })) (if_statement "if (bVar3) goto LAB_00015fbc;" if (parenthesized_expression "(bVar3)" ( identifier )) (goto_statement "goto LAB_00015fbc;" goto statement_identifier ;)) }))) (if_statement "if (param_5 == (uint *)0x0) {\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }" if (parenthesized_expression "(param_5 == (uint *)0x0)" ( (binary_expression "param_5 == (uint *)0x0" identifier == (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }" { (if_statement "if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }" if (parenthesized_expression "(DAT_0003c354 == 0)" ( (binary_expression "DAT_0003c354 == 0" identifier == number_literal) )) (compound_statement "{\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }" { (expression_statement "*param_6 = 0;" (assignment_expression "*param_6 = 0" (pointer_expression "*param_6" * identifier) = number_literal) ;) (goto_statement "goto LAB_0001603e;" goto statement_identifier ;) })) (labeled_statement "LAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;" statement_identifier : (expression_statement "bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;" (assignment_expression "bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1" identifier = (binary_expression "(DAT_0003c355 ^ 1 | local_35) ^ 1" (parenthesized_expression "(DAT_0003c355 ^ 1 | local_35)" ( (binary_expression "DAT_0003c355 ^ 1 | local_35" (binary_expression "DAT_0003c355 ^ 1" identifier ^ number_literal) | identifier) )) ^ number_literal)) ;)) (goto_statement "goto LAB_00016026;" goto statement_identifier ;) })) (expression_statement "sVar5 = __ctype_get_mb_cur_max();" (assignment_expression "sVar5 = __ctype_get_mb_cur_max()" identifier = (call_expression "__ctype_get_mb_cur_max()" identifier (argument_list "()" ( )))) ;) (if_statement "if (sVar5 < 2) {\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }" if (parenthesized_expression "(sVar5 < 2)" ( (binary_expression "sVar5 < 2" identifier < number_literal) )) (compound_statement "{\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }" { (if_statement "if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }" if (parenthesized_expression "(local_44 < local_44 + uVar4)" ( (binary_expression "local_44 < local_44 + uVar4" identifier < (binary_expression "local_44 + uVar4" identifier + identifier)) )) (compound_statement "{\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }" { (expression_statement "ppuVar6 = __ctype_b_loc();" (assignment_expression "ppuVar6 = __ctype_b_loc()" identifier = (call_expression "__ctype_b_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "local_4c = 0;" (assignment_expression "local_4c = 0" identifier = number_literal) ;) (expression_statement "pbVar12 = local_44;" (assignment_expression "pbVar12 = local_44" identifier = identifier) ;) (do_statement "do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);" do (compound_statement "{\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        }" { (expression_statement "local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);" (assignment_expression "local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0)" identifier = (binary_expression "(local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0)" (parenthesized_expression "(local_4c + 1)" ( (binary_expression "local_4c + 1" identifier + number_literal) )) - (call_expression "(uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(((*ppuVar6)[*pbVar12] & 0x4000) == 0)" ( (binary_expression "((*ppuVar6)[*pbVar12] & 0x4000) == 0" (parenthesized_expression "((*ppuVar6)[*pbVar12] & 0x4000)" ( (binary_expression "(*ppuVar6)[*pbVar12] & 0x4000" (subscript_expression "(*ppuVar6)[*pbVar12]" (parenthesized_expression "(*ppuVar6)" ( (pointer_expression "*ppuVar6" * identifier) )) [ (pointer_expression "*pbVar12" * identifier) ]) & number_literal) )) == number_literal) ))))) ;) (expression_statement "pbVar12 = pbVar12 + 1;" (assignment_expression "pbVar12 = pbVar12 + 1" identifier = (binary_expression "pbVar12 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(local_44 + uVar4 != pbVar12)" ( (binary_expression "local_44 + uVar4 != pbVar12" (binary_expression "local_44 + uVar4" identifier + identifier) != identifier) )) ;) }) (else_clause "else {\n        local_4c = 0;\n      }" else (compound_statement "{\n        local_4c = 0;\n      }" { (expression_statement "local_4c = 0;" (assignment_expression "local_4c = 0" identifier = number_literal) ;) }))) }) (else_clause "else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }" else (compound_statement "{\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }" { (expression_statement "local_4c = FUN_0001f960(local_44,uVar4,0);" (assignment_expression "local_4c = FUN_0001f960(local_44,uVar4,0)" identifier = (call_expression "FUN_0001f960(local_44,uVar4,0)" identifier (argument_list "(local_44,uVar4,0)" ( identifier , identifier , number_literal )))) ;) }))) (if_statement "if (DAT_0003c354 != 0) goto LAB_00016015;" if (parenthesized_expression "(DAT_0003c354 != 0)" ( (binary_expression "DAT_0003c354 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00016015;" goto statement_identifier ;)) (expression_statement "*param_6 = 0;" (assignment_expression "*param_6 = 0" (pointer_expression "*param_6" * identifier) = number_literal) ;) }) (else_clause "else {\n    if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }\n    uVar4 = strlen((char *)param_2);\n    if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }\n    memcpy(local_44,param_2,uVar4 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = uVar4;\n    sVar5 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }\n    bVar14 = DAT_0003c354;\n    if (DAT_0003c354 != 0) goto LAB_00016015;\nLAB_00016026:\n    *param_6 = bVar14;\n    if (param_5 == (uint *)0x0) goto LAB_0001603e;\n  }" else (compound_statement "{\n    if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }\n    uVar4 = strlen((char *)param_2);\n    if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }\n    memcpy(local_44,param_2,uVar4 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = uVar4;\n    sVar5 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }\n    bVar14 = DAT_0003c354;\n    if (DAT_0003c354 != 0) goto LAB_00016015;\nLAB_00016026:\n    *param_6 = bVar14;\n    if (param_5 == (uint *)0x0) goto LAB_0001603e;\n  }" { (if_statement "if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n      bVar3 = true;\n      goto LAB_00015e76;\n    }" { (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" identifier = true) ;) (goto_statement "goto LAB_00015e76;" goto statement_identifier ;) })) (expression_statement "uVar4 = strlen((char *)param_2);" (assignment_expression "uVar4 = strlen((char *)param_2)" identifier = (call_expression "strlen((char *)param_2)" identifier (argument_list "((char *)param_2)" ( (cast_expression "(char *)param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }" if (parenthesized_expression "(0x1fff < uVar4)" ( (binary_expression "0x1fff < uVar4" number_literal < identifier) )) (compound_statement "{\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }" { (expression_statement "local_44 = (byte *)FUN_00023f30(uVar4 + 1);" (assignment_expression "local_44 = (byte *)FUN_00023f30(uVar4 + 1)" identifier = (cast_expression "(byte *)FUN_00023f30(uVar4 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00023f30(uVar4 + 1)" identifier (argument_list "(uVar4 + 1)" ( (binary_expression "uVar4 + 1" identifier + number_literal) ))))) ;) })) (expression_statement "memcpy(local_44,param_2,uVar4 + 1);" (call_expression "memcpy(local_44,param_2,uVar4 + 1)" identifier (argument_list "(local_44,param_2,uVar4 + 1)" ( identifier , identifier , (binary_expression "uVar4 + 1" identifier + number_literal) ))) ;) (expression_statement "local_35 = false;" (assignment_expression "local_35 = false" identifier = false) ;) (labeled_statement "LAB_00015fbc:\n    local_4c = uVar4;" statement_identifier : (expression_statement "local_4c = uVar4;" (assignment_expression "local_4c = uVar4" identifier = identifier) ;)) (expression_statement "sVar5 = __ctype_get_mb_cur_max();" (assignment_expression "sVar5 = __ctype_get_mb_cur_max()" identifier = (call_expression "__ctype_get_mb_cur_max()" identifier (argument_list "()" ( )))) ;) (expression_statement "pbVar12 = local_44 + local_4c;" (assignment_expression "pbVar12 = local_44 + local_4c" identifier = (binary_expression "local_44 + local_4c" identifier + identifier)) ;) (if_statement "if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }" if (parenthesized_expression "(sVar5 < 2)" ( (binary_expression "sVar5 < 2" identifier < number_literal) )) (compound_statement "{\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }" { (expression_statement "uVar4 = local_4c;" (assignment_expression "uVar4 = local_4c" identifier = identifier) ;) (if_statement "if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }" if (parenthesized_expression "(local_44 < pbVar12)" ( (binary_expression "local_44 < pbVar12" identifier < identifier) )) (compound_statement "{\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }" { (expression_statement "ppuVar6 = __ctype_b_loc();" (assignment_expression "ppuVar6 = __ctype_b_loc()" identifier = (call_expression "__ctype_b_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "pbVar9 = local_44;" (assignment_expression "pbVar9 = local_44" identifier = identifier) ;) (do_statement "do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);" do (compound_statement "{\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        }" { (if_statement "if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }" if (parenthesized_expression "((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0)" ( (binary_expression "(*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0" (parenthesized_expression "(*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40)" ( (binary_expression "*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40" (pointer_expression "*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1)" * (cast_expression "(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1)" ( (binary_expression "(int)*ppuVar6 + (uint)*pbVar9 * 2 + 1" (binary_expression "(int)*ppuVar6 + (uint)*pbVar9 * 2" (cast_expression "(int)*ppuVar6" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*ppuVar6" * identifier)) + (binary_expression "(uint)*pbVar9 * 2" (binary_expression "(uint)*pbVar9" (parenthesized_expression "(uint)" ( identifier )) * identifier) * number_literal)) + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n            *pbVar9 = 0x3f;\n          }" { (expression_statement "*pbVar9 = 0x3f;" (assignment_expression "*pbVar9 = 0x3f" (pointer_expression "*pbVar9" * identifier) = number_literal) ;) })) (expression_statement "pbVar9 = pbVar9 + 1;" (assignment_expression "pbVar9 = pbVar9 + 1" identifier = (binary_expression "pbVar9 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pbVar9 != pbVar12)" ( (binary_expression "pbVar9 != pbVar12" identifier != identifier) )) ;) })) }) (else_clause "else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }" else (if_statement "if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }" if (parenthesized_expression "(local_44 < pbVar12)" ( (binary_expression "local_44 < pbVar12" identifier < identifier) )) (compound_statement "{\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }" { (expression_statement "local_4c = 0;" (assignment_expression "local_4c = 0" identifier = number_literal) ;) (expression_statement "local_54 = local_44;" (assignment_expression "local_54 = local_44" identifier = identifier) ;) (expression_statement "pbVar9 = local_44;" (assignment_expression "pbVar9 = local_44" identifier = identifier) ;) (do_statement "do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);" do (compound_statement "{\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      }" { (expression_statement "bVar2 = *pbVar9;" (assignment_expression "bVar2 = *pbVar9" identifier = (pointer_expression "*pbVar9" * identifier)) ;) (if_statement "if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }" if (parenthesized_expression "((char)bVar2 < '@')" ( (binary_expression "(char)bVar2 < '@'" (cast_expression "(char)bVar2" ( (type_descriptor "char" primitive_type) ) identifier) < (char_literal "'@'" ' character ')) )) (compound_statement "{\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }" { (if_statement "if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;" if (parenthesized_expression "(((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20)))" ( (binary_expression "((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))" (parenthesized_expression "((char)bVar2 < '%')" ( (binary_expression "(char)bVar2 < '%'" (cast_expression "(char)bVar2" ( (type_descriptor "char" primitive_type) ) identifier) < (char_literal "'%'" ' character ')) )) && (parenthesized_expression "(3 < (byte)(bVar2 - 0x20))" ( (binary_expression "3 < (byte)(bVar2 - 0x20)" number_literal < (call_expression "(byte)(bVar2 - 0x20)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar2 - 0x20)" ( (binary_expression "bVar2 - 0x20" identifier - number_literal) )))) ))) )) (goto_statement "goto LAB_000160d2;" goto statement_identifier ;)) (labeled_statement "LAB_0001609c:\n          local_4c = local_4c + 1;" statement_identifier : (expression_statement "local_4c = local_4c + 1;" (assignment_expression "local_4c = local_4c + 1" identifier = (binary_expression "local_4c + 1" identifier + number_literal)) ;)) (expression_statement "pbVar9 = pbVar9 + 1;" (assignment_expression "pbVar9 = pbVar9 + 1" identifier = (binary_expression "pbVar9 + 1" identifier + number_literal)) ;) (expression_statement "*local_54 = bVar2;" (assignment_expression "*local_54 = bVar2" (pointer_expression "*local_54" * identifier) = identifier) ;) (expression_statement "local_54 = local_54 + 1;" (assignment_expression "local_54 = local_54 + 1" identifier = (binary_expression "local_54 + 1" identifier + number_literal)) ;) }) (else_clause "else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }" else (compound_statement "{\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }" { (if_statement "if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;" if (parenthesized_expression "(('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))" ( (binary_expression "('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e)))" (parenthesized_expression "('@' < (char)bVar2)" ( (binary_expression "'@' < (char)bVar2" (char_literal "'@'" ' character ') < (cast_expression "(char)bVar2" ( (type_descriptor "char" primitive_type) ) identifier)) )) && (parenthesized_expression "(((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e)))" ( (parenthesized_expression "((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))" ( (binary_expression "(char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e)" (binary_expression "(char)bVar2 < '`'" (cast_expression "(char)bVar2" ( (type_descriptor "char" primitive_type) ) identifier) < (char_literal "'`'" ' character ')) || (parenthesized_expression "((byte)(bVar2 + 0x9f) < 0x1e)" ( (binary_expression "(byte)(bVar2 + 0x9f) < 0x1e" (call_expression "(byte)(bVar2 + 0x9f)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar2 + 0x9f)" ( (binary_expression "bVar2 + 0x9f" identifier + number_literal) ))) < number_literal) ))) )) ))) )) (goto_statement "goto LAB_0001609c;" goto statement_identifier ;)) (labeled_statement "LAB_000160d2:\n          local_28.__count = 0;" statement_identifier : (expression_statement "local_28.__count = 0;" (assignment_expression "local_28.__count = 0" (field_expression "local_28.__count" identifier . field_identifier) = number_literal) ;)) (expression_statement "local_28.__value.__wch = 0;" (assignment_expression "local_28.__value.__wch = 0" (field_expression "local_28.__value.__wch" (field_expression "local_28.__value" identifier . field_identifier) . field_identifier) = number_literal) ;) (expression_statement "pbVar11 = pbVar9;" (assignment_expression "pbVar11 = pbVar9" identifier = identifier) ;) (do_statement "do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);" do (compound_statement "{\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          }" { (expression_statement "iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);" (assignment_expression "iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28)" identifier = (call_expression "FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28)" identifier (argument_list "(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28)" ( (pointer_expression "&local_2c" & identifier) , identifier , (binary_expression "(int)pbVar12 - (int)pbVar11" (cast_expression "(int)pbVar12" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar11" ( (type_descriptor "int" primitive_type) ) identifier)) , (pointer_expression "&local_28" & identifier) )))) ;) (expression_statement "pbVar1 = local_54 + 1;" (assignment_expression "pbVar1 = local_54 + 1" identifier = (binary_expression "local_54 + 1" identifier + number_literal)) ;) (if_statement "if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }" if (parenthesized_expression "(iVar7 == -1)" ( (binary_expression "iVar7 == -1" identifier == number_literal) )) (compound_statement "{\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }" { (expression_statement "pbVar9 = pbVar11 + 1;" (assignment_expression "pbVar9 = pbVar11 + 1" identifier = (binary_expression "pbVar11 + 1" identifier + number_literal)) ;) (expression_statement "*local_54 = 0x3f;" (assignment_expression "*local_54 = 0x3f" (pointer_expression "*local_54" * identifier) = number_literal) ;) (labeled_statement "LAB_000161e7:\n              local_4c = local_4c + 1;" statement_identifier : (expression_statement "local_4c = local_4c + 1;" (assignment_expression "local_4c = local_4c + 1" identifier = (binary_expression "local_4c + 1" identifier + number_literal)) ;)) (expression_statement "local_54 = pbVar1;" (assignment_expression "local_54 = pbVar1" identifier = identifier) ;) (break_statement "break;" break ;) })) (if_statement "if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }" if (parenthesized_expression "(iVar7 == -2)" ( (binary_expression "iVar7 == -2" identifier == number_literal) )) (compound_statement "{\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }" { (expression_statement "*local_54 = 0x3f;" (assignment_expression "*local_54 = 0x3f" (pointer_expression "*local_54" * identifier) = number_literal) ;) (expression_statement "pbVar9 = pbVar12;" (assignment_expression "pbVar9 = pbVar12" identifier = identifier) ;) (goto_statement "goto LAB_000161e7;" goto statement_identifier ;) })) (if_statement "if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }" if (parenthesized_expression "(iVar7 == 0)" ( (binary_expression "iVar7 == 0" identifier == number_literal) )) (compound_statement "{\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }" { (expression_statement "iVar8 = wcwidth(local_2c);" (assignment_expression "iVar8 = wcwidth(local_2c)" identifier = (call_expression "wcwidth(local_2c)" identifier (argument_list "(local_2c)" ( identifier )))) ;) (expression_statement "pbVar9 = pbVar11 + 1;" (assignment_expression "pbVar9 = pbVar11 + 1" identifier = (binary_expression "pbVar11 + 1" identifier + number_literal)) ;) (if_statement "if (iVar8 < 0) goto LAB_000160ff;" if (parenthesized_expression "(iVar8 < 0)" ( (binary_expression "iVar8 < 0" identifier < number_literal) )) (goto_statement "goto LAB_000160ff;" goto statement_identifier ;)) (expression_statement "*local_54 = *pbVar11;" (assignment_expression "*local_54 = *pbVar11" (pointer_expression "*local_54" * identifier) = (pointer_expression "*pbVar11" * identifier)) ;) (expression_statement "pbVar10 = pbVar9;" (assignment_expression "pbVar10 = pbVar9" identifier = identifier) ;) (expression_statement "local_54 = pbVar1;" (assignment_expression "local_54 = pbVar1" identifier = identifier) ;) (labeled_statement "LAB_00016181:\n              local_4c = local_4c + iVar8;" statement_identifier : (expression_statement "local_4c = local_4c + iVar8;" (assignment_expression "local_4c = local_4c + iVar8" identifier = (binary_expression "local_4c + iVar8" identifier + identifier)) ;)) (expression_statement "pbVar9 = pbVar10;" (assignment_expression "pbVar9 = pbVar10" identifier = identifier) ;) }) (else_clause "else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }" else (compound_statement "{\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }" { (expression_statement "iVar8 = wcwidth(local_2c);" (assignment_expression "iVar8 = wcwidth(local_2c)" identifier = (call_expression "wcwidth(local_2c)" identifier (argument_list "(local_2c)" ( identifier )))) ;) (expression_statement "pbVar9 = pbVar11 + iVar7;" (assignment_expression "pbVar9 = pbVar11 + iVar7" identifier = (binary_expression "pbVar11 + iVar7" identifier + identifier)) ;) (expression_statement "pbVar13 = local_54;" (assignment_expression "pbVar13 = local_54" identifier = identifier) ;) (if_statement "if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }" if (parenthesized_expression "(-1 < iVar8)" ( (binary_expression "-1 < iVar8" number_literal < identifier) )) (compound_statement "{\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }" { (do_statement "do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);" do (compound_statement "{\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                }" { (expression_statement "pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;" (assignment_expression "pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1" identifier = (binary_expression "pbVar11 + (uint)bVar14 * -2 + 1" (binary_expression "pbVar11 + (uint)bVar14 * -2" identifier + (binary_expression "(uint)bVar14 * -2" (cast_expression "(uint)bVar14" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "*pbVar13 = *pbVar11;" (assignment_expression "*pbVar13 = *pbVar11" (pointer_expression "*pbVar13" * identifier) = (pointer_expression "*pbVar11" * identifier)) ;) (expression_statement "pbVar11 = pbVar10;" (assignment_expression "pbVar11 = pbVar10" identifier = identifier) ;) (expression_statement "pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;" (assignment_expression "pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1" identifier = (binary_expression "pbVar13 + (uint)bVar14 * -2 + 1" (binary_expression "pbVar13 + (uint)bVar14 * -2" identifier + (binary_expression "(uint)bVar14 * -2" (cast_expression "(uint)bVar14" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(pbVar10 != pbVar9)" ( (binary_expression "pbVar10 != pbVar9" identifier != identifier) )) ;) (expression_statement "local_54 = local_54 + iVar7;" (assignment_expression "local_54 = local_54 + iVar7" identifier = (binary_expression "local_54 + iVar7" identifier + identifier)) ;) (goto_statement "goto LAB_00016181;" goto statement_identifier ;) })) (labeled_statement "LAB_000160ff:\n              local_4c = local_4c + 1;" statement_identifier : (expression_statement "local_4c = local_4c + 1;" (assignment_expression "local_4c = local_4c + 1" identifier = (binary_expression "local_4c + 1" identifier + number_literal)) ;)) (expression_statement "*local_54 = 0x3f;" (assignment_expression "*local_54 = 0x3f" (pointer_expression "*local_54" * identifier) = number_literal) ;) (expression_statement "local_54 = pbVar1;" (assignment_expression "local_54 = pbVar1" identifier = identifier) ;) }))) (expression_statement "iVar7 = mbsinit(&local_28);" (assignment_expression "iVar7 = mbsinit(&local_28)" identifier = (call_expression "mbsinit(&local_28)" identifier (argument_list "(&local_28)" ( (pointer_expression "&local_28" & identifier) )))) ;) (expression_statement "pbVar11 = pbVar9;" (assignment_expression "pbVar11 = pbVar9" identifier = identifier) ;) }) while (parenthesized_expression "(iVar7 == 0)" ( (binary_expression "iVar7 == 0" identifier == number_literal) )) ;) }))) }) while (parenthesized_expression "(pbVar9 < pbVar12)" ( (binary_expression "pbVar9 < pbVar12" identifier < identifier) )) ;) (expression_statement "uVar4 = (int)local_54 - (int)local_44;" (assignment_expression "uVar4 = (int)local_54 - (int)local_44" identifier = (binary_expression "(int)local_54 - (int)local_44" (cast_expression "(int)local_54" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)local_44" ( (type_descriptor "int" primitive_type) ) identifier))) ;) }) (else_clause "else {\n      local_4c = 0;\n      uVar4 = 0;\n    }" else (compound_statement "{\n      local_4c = 0;\n      uVar4 = 0;\n    }" { (expression_statement "local_4c = 0;" (assignment_expression "local_4c = 0" identifier = number_literal) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }))))) (expression_statement "bVar14 = DAT_0003c354;" (assignment_expression "bVar14 = DAT_0003c354" identifier = identifier) ;) (if_statement "if (DAT_0003c354 != 0) goto LAB_00016015;" if (parenthesized_expression "(DAT_0003c354 != 0)" ( (binary_expression "DAT_0003c354 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00016015;" goto statement_identifier ;)) (labeled_statement "LAB_00016026:\n    *param_6 = bVar14;" statement_identifier : (expression_statement "*param_6 = bVar14;" (assignment_expression "*param_6 = bVar14" (pointer_expression "*param_6" * identifier) = identifier) ;)) (if_statement "if (param_5 == (uint *)0x0) goto LAB_0001603e;" if (parenthesized_expression "(param_5 == (uint *)0x0)" ( (binary_expression "param_5 == (uint *)0x0" identifier == (cast_expression "(uint *)0x0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0001603e;" goto statement_identifier ;)) }))) (expression_statement "*param_5 = local_4c;" (assignment_expression "*param_5 = local_4c" (pointer_expression "*param_5" * identifier) = identifier) ;) (labeled_statement "LAB_0001603e:\n  *param_1 = local_44;" statement_identifier : (expression_statement "*param_1 = local_44;" (assignment_expression "*param_1 = local_44" (pointer_expression "*param_1" * identifier) = identifier) ;)) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b190();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_0002b190();\n  }" { (expression_statement "FUN_0002b190();" (call_expression "FUN_0002b190()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (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 IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (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 *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT < LIT) & IDENT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = BOOL) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) )))) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , IDENT , LIT , IDENT )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) , IDENT , LIT , IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = BOOL) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (pointer_expression * IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT != IDENT)) ;) })) (if_statement if (parenthesized_expression ( IDENT )) (goto_statement goto statement_identifier ;)) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (goto_statement goto statement_identifier ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT ^ LIT) | IDENT) )) ^ LIT)) ;)) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < (binary_expression IDENT + IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression (parenthesized_expression ( (pointer_expression * IDENT) )) [ (pointer_expression * IDENT) ]) & LIT) )) == LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) != IDENT) )) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = BOOL) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) ))) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT)) + (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * IDENT) * LIT)) + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < (char_literal ' character ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < (char_literal ' character ')) )) && (parenthesized_expression ( (binary_expression LIT < (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - LIT) )))) ))) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (char_literal ' character ') < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < (char_literal ' character ')) || (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) < LIT) ))) )) ))) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = LIT) ;)) (expression_statement (assignment_expression (field_expression (field_expression IDENT . field_identifier) . field_identifier) = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) , (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (break_statement break ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (goto_statement goto statement_identifier ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT == LIT) )) ;) }))) }) while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_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 (pointer_expression * IDENT) = IDENT) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "uint __regparm3\nFUN_00015e10(undefined4 *param_1,byte *param_2,undefined4 param_3,int param_4,uint *param_5,\n            byte *param_6)\n\n{\n  byte *pbVar1;\n  byte bVar2;\n  bool bVar3;\n  uint uVar4;\n  size_t sVar5;\n  ushort **ppuVar6;\n  int iVar7;\n  int iVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  byte *pbVar12;\n  byte *pbVar13;\n  int in_GS_OFFSET;\n  byte bVar14;\n  byte *local_54;\n  uint local_4c;\n  byte *local_44;\n  bool local_35;\n  wchar_t local_2c;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  byte *pbVar11;\n  \n  bVar14 = 0;\n  uStack_14 = 0x15e1d;\n  local_44 = (byte *)*param_1;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar4 = FUN_00022de0(param_3);\n  if ((uVar4 < 3 & DAT_0003c2bc) == 0) {\n    bVar3 = false;\n    if (param_4 == 0) {\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }\n    else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }\n    if (param_5 == (uint *)0x0) {\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar5 = __ctype_get_mb_cur_max();\n    if (sVar5 < 2) {\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }\n    if (DAT_0003c354 != 0) goto LAB_00016015;\n    *param_6 = 0;\n  }\n  else {\n    if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }\n    uVar4 = strlen((char *)param_2);\n    if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }\n    memcpy(local_44,param_2,uVar4 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = uVar4;\n    sVar5 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }\n    bVar14 = DAT_0003c354;\n    if (DAT_0003c354 != 0) goto LAB_00016015;\nLAB_00016026:\n    *param_6 = bVar14;\n    if (param_5 == (uint *)0x0) goto LAB_0001603e;\n  }\n  *param_5 = local_4c;\nLAB_0001603e:\n  *param_1 = local_44;\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b190();\n  }\n  return uVar4;\n}" (type_identifier "uint") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00015e10(undefined4 *param_1,byte *param_2,undefined4 param_3,int param_4,uint *param_5,\n            byte *param_6)" (identifier "FUN_00015e10") (parameter_list "(undefined4 *param_1,byte *param_2,undefined4 param_3,int param_4,uint *param_5,\n            byte *param_6)" (( "(") (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 "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) (, ",") (parameter_declaration "uint *param_5" (type_identifier "uint") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) (, ",") (parameter_declaration "byte *param_6" (type_identifier "byte") (pointer_declarator "*param_6" (* "*") (identifier "param_6"))) () ")"))) (compound_statement "{\n  byte *pbVar1;\n  byte bVar2;\n  bool bVar3;\n  uint uVar4;\n  size_t sVar5;\n  ushort **ppuVar6;\n  int iVar7;\n  int iVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  byte *pbVar12;\n  byte *pbVar13;\n  int in_GS_OFFSET;\n  byte bVar14;\n  byte *local_54;\n  uint local_4c;\n  byte *local_44;\n  bool local_35;\n  wchar_t local_2c;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  byte *pbVar11;\n  \n  bVar14 = 0;\n  uStack_14 = 0x15e1d;\n  local_44 = (byte *)*param_1;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar4 = FUN_00022de0(param_3);\n  if ((uVar4 < 3 & DAT_0003c2bc) == 0) {\n    bVar3 = false;\n    if (param_4 == 0) {\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }\n    else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }\n    if (param_5 == (uint *)0x0) {\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar5 = __ctype_get_mb_cur_max();\n    if (sVar5 < 2) {\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }\n    if (DAT_0003c354 != 0) goto LAB_00016015;\n    *param_6 = 0;\n  }\n  else {\n    if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }\n    uVar4 = strlen((char *)param_2);\n    if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }\n    memcpy(local_44,param_2,uVar4 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = uVar4;\n    sVar5 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }\n    bVar14 = DAT_0003c354;\n    if (DAT_0003c354 != 0) goto LAB_00016015;\nLAB_00016026:\n    *param_6 = bVar14;\n    if (param_5 == (uint *)0x0) goto LAB_0001603e;\n  }\n  *param_5 = local_4c;\nLAB_0001603e:\n  *param_1 = local_44;\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b190();\n  }\n  return uVar4;\n}" ({ "{") (declaration "byte *pbVar1;" (type_identifier "byte") (pointer_declarator "*pbVar1" (* "*") (identifier "pbVar1")) (; ";")) (declaration "byte bVar2;" (type_identifier "byte") (identifier "bVar2") (; ";")) (declaration "bool bVar3;" (primitive_type "bool") (identifier "bVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "size_t sVar5;" (primitive_type "size_t") (identifier "sVar5") (; ";")) (declaration "ushort **ppuVar6;" (type_identifier "ushort") (pointer_declarator "**ppuVar6" (* "*") (pointer_declarator "*ppuVar6" (* "*") (identifier "ppuVar6"))) (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "int iVar8;" (primitive_type "int") (identifier "iVar8") (; ";")) (declaration "byte *pbVar9;" (type_identifier "byte") (pointer_declarator "*pbVar9" (* "*") (identifier "pbVar9")) (; ";")) (declaration "byte *pbVar10;" (type_identifier "byte") (pointer_declarator "*pbVar10" (* "*") (identifier "pbVar10")) (; ";")) (declaration "byte *pbVar12;" (type_identifier "byte") (pointer_declarator "*pbVar12" (* "*") (identifier "pbVar12")) (; ";")) (declaration "byte *pbVar13;" (type_identifier "byte") (pointer_declarator "*pbVar13" (* "*") (identifier "pbVar13")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "byte bVar14;" (type_identifier "byte") (identifier "bVar14") (; ";")) (declaration "byte *local_54;" (type_identifier "byte") (pointer_declarator "*local_54" (* "*") (identifier "local_54")) (; ";")) (declaration "uint local_4c;" (type_identifier "uint") (identifier "local_4c") (; ";")) (declaration "byte *local_44;" (type_identifier "byte") (pointer_declarator "*local_44" (* "*") (identifier "local_44")) (; ";")) (declaration "bool local_35;" (primitive_type "bool") (identifier "local_35") (; ";")) (declaration "wchar_t local_2c;" (type_identifier "wchar_t") (identifier "local_2c") (; ";")) (declaration "mbstate_t local_28;" (type_identifier "mbstate_t") (identifier "local_28") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (declaration "byte *pbVar11;" (type_identifier "byte") (pointer_declarator "*pbVar11" (* "*") (identifier "pbVar11")) (; ";")) (expression_statement "bVar14 = 0;" (assignment_expression "bVar14 = 0" (identifier "bVar14") (= "=") (number_literal "0")) (; ";")) (expression_statement "uStack_14 = 0x15e1d;" (assignment_expression "uStack_14 = 0x15e1d" (identifier "uStack_14") (= "=") (number_literal "0x15e1d")) (; ";")) (expression_statement "local_44 = (byte *)*param_1;" (assignment_expression "local_44 = (byte *)*param_1" (identifier "local_44") (= "=") (cast_expression "(byte *)*param_1" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "uVar4 = FUN_00022de0(param_3);" (assignment_expression "uVar4 = FUN_00022de0(param_3)" (identifier "uVar4") (= "=") (call_expression "FUN_00022de0(param_3)" (identifier "FUN_00022de0") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")")))) (; ";")) (if_statement "if ((uVar4 < 3 & DAT_0003c2bc) == 0) {\n    bVar3 = false;\n    if (param_4 == 0) {\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }\n    else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }\n    if (param_5 == (uint *)0x0) {\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar5 = __ctype_get_mb_cur_max();\n    if (sVar5 < 2) {\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }\n    if (DAT_0003c354 != 0) goto LAB_00016015;\n    *param_6 = 0;\n  }\n  else {\n    if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }\n    uVar4 = strlen((char *)param_2);\n    if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }\n    memcpy(local_44,param_2,uVar4 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = uVar4;\n    sVar5 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }\n    bVar14 = DAT_0003c354;\n    if (DAT_0003c354 != 0) goto LAB_00016015;\nLAB_00016026:\n    *param_6 = bVar14;\n    if (param_5 == (uint *)0x0) goto LAB_0001603e;\n  }" (if "if") (parenthesized_expression "((uVar4 < 3 & DAT_0003c2bc) == 0)" (( "(") (binary_expression "(uVar4 < 3 & DAT_0003c2bc) == 0" (parenthesized_expression "(uVar4 < 3 & DAT_0003c2bc)" (( "(") (binary_expression "uVar4 < 3 & DAT_0003c2bc" (binary_expression "uVar4 < 3" (identifier "uVar4") (< "<") (number_literal "3")) (& "&") (identifier "DAT_0003c2bc")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    bVar3 = false;\n    if (param_4 == 0) {\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }\n    else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }\n    if (param_5 == (uint *)0x0) {\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }\n    sVar5 = __ctype_get_mb_cur_max();\n    if (sVar5 < 2) {\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }\n    if (DAT_0003c354 != 0) goto LAB_00016015;\n    *param_6 = 0;\n  }" ({ "{") (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" (identifier "bVar3") (= "=") (false "false")) (; ";")) (if_statement "if (param_4 == 0) {\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }\n    else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }" (if "if") (parenthesized_expression "(param_4 == 0)" (( "(") (binary_expression "param_4 == 0" (identifier "param_4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar4 = strlen((char *)param_2);\n      local_35 = false;\n      local_44 = param_2;\n    }" ({ "{") (expression_statement "uVar4 = strlen((char *)param_2);" (assignment_expression "uVar4 = strlen((char *)param_2)" (identifier "uVar4") (= "=") (call_expression "strlen((char *)param_2)" (identifier "strlen") (argument_list "((char *)param_2)" (( "(") (cast_expression "(char *)param_2" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_2")) () ")")))) (; ";")) (expression_statement "local_35 = false;" (assignment_expression "local_35 = false" (identifier "local_35") (= "=") (false "false")) (; ";")) (expression_statement "local_44 = param_2;" (assignment_expression "local_44 = param_2" (identifier "local_44") (= "=") (identifier "param_2")) (; ";")) (} "}")) (else_clause "else {\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }" (else "else") (compound_statement "{\nLAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);\n      if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }\n      local_35 = true;\n      if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }\n      if (bVar3) goto LAB_00015fbc;\n    }" ({ "{") (labeled_statement "LAB_00015e76:\n      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);" (statement_identifier "LAB_00015e76") (: ":") (expression_statement "uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);" (assignment_expression "uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3)" (identifier "uVar4") (= "=") (call_expression "FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3)" (identifier "FUN_00022f00") (argument_list "(local_44,0x2000,param_2,0xffffffff,param_3)" (( "(") (identifier "local_44") (, ",") (number_literal "0x2000") (, ",") (identifier "param_2") (, ",") (number_literal "0xffffffff") (, ",") (identifier "param_3") () ")")))) (; ";"))) (if_statement "if (0x1fff < uVar4) {\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }" (if "if") (parenthesized_expression "(0x1fff < uVar4)" (( "(") (binary_expression "0x1fff < uVar4" (number_literal "0x1fff") (< "<") (identifier "uVar4")) () ")")) (compound_statement "{\n        local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);\n      }" ({ "{") (expression_statement "local_44 = (byte *)FUN_00023f30(uVar4 + 1);" (assignment_expression "local_44 = (byte *)FUN_00023f30(uVar4 + 1)" (identifier "local_44") (= "=") (cast_expression "(byte *)FUN_00023f30(uVar4 + 1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00023f30(uVar4 + 1)" (identifier "FUN_00023f30") (argument_list "(uVar4 + 1)" (( "(") (binary_expression "uVar4 + 1" (identifier "uVar4") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);" (call_expression "FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3)" (identifier "FUN_00022f00") (argument_list "(local_44,uVar4 + 1,param_2,0xffffffff,param_3)" (( "(") (identifier "local_44") (, ",") (binary_expression "uVar4 + 1" (identifier "uVar4") (+ "+") (number_literal "1")) (, ",") (identifier "param_2") (, ",") (number_literal "0xffffffff") (, ",") (identifier "param_3") () ")"))) (; ";")) (} "}"))) (expression_statement "local_35 = true;" (assignment_expression "local_35 = true" (identifier "local_35") (= "=") (true "true")) (; ";")) (if_statement "if (*param_2 == *local_44) {\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }" (if "if") (parenthesized_expression "(*param_2 == *local_44)" (( "(") (binary_expression "*param_2 == *local_44" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (== "==") (pointer_expression "*local_44" (* "*") (identifier "local_44"))) () ")")) (compound_statement "{\n        sVar5 = strlen((char *)param_2);\n        local_35 = uVar4 != sVar5;\n      }" ({ "{") (expression_statement "sVar5 = strlen((char *)param_2);" (assignment_expression "sVar5 = strlen((char *)param_2)" (identifier "sVar5") (= "=") (call_expression "strlen((char *)param_2)" (identifier "strlen") (argument_list "((char *)param_2)" (( "(") (cast_expression "(char *)param_2" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_2")) () ")")))) (; ";")) (expression_statement "local_35 = uVar4 != sVar5;" (assignment_expression "local_35 = uVar4 != sVar5" (identifier "local_35") (= "=") (binary_expression "uVar4 != sVar5" (identifier "uVar4") (!= "!=") (identifier "sVar5"))) (; ";")) (} "}"))) (if_statement "if (bVar3) goto LAB_00015fbc;" (if "if") (parenthesized_expression "(bVar3)" (( "(") (identifier "bVar3") () ")")) (goto_statement "goto LAB_00015fbc;" (goto "goto") (statement_identifier "LAB_00015fbc") (; ";"))) (} "}")))) (if_statement "if (param_5 == (uint *)0x0) {\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }" (if "if") (parenthesized_expression "(param_5 == (uint *)0x0)" (( "(") (binary_expression "param_5 == (uint *)0x0" (identifier "param_5") (== "==") (cast_expression "(uint *)0x0" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }\nLAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;\n      goto LAB_00016026;\n    }" ({ "{") (if_statement "if (DAT_0003c354 == 0) {\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }" (if "if") (parenthesized_expression "(DAT_0003c354 == 0)" (( "(") (binary_expression "DAT_0003c354 == 0" (identifier "DAT_0003c354") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        *param_6 = 0;\n        goto LAB_0001603e;\n      }" ({ "{") (expression_statement "*param_6 = 0;" (assignment_expression "*param_6 = 0" (pointer_expression "*param_6" (* "*") (identifier "param_6")) (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_0001603e;" (goto "goto") (statement_identifier "LAB_0001603e") (; ";")) (} "}"))) (labeled_statement "LAB_00016015:\n      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;" (statement_identifier "LAB_00016015") (: ":") (expression_statement "bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;" (assignment_expression "bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1" (identifier "bVar14") (= "=") (binary_expression "(DAT_0003c355 ^ 1 | local_35) ^ 1" (parenthesized_expression "(DAT_0003c355 ^ 1 | local_35)" (( "(") (binary_expression "DAT_0003c355 ^ 1 | local_35" (binary_expression "DAT_0003c355 ^ 1" (identifier "DAT_0003c355") (^ "^") (number_literal "1")) (| "|") (identifier "local_35")) () ")")) (^ "^") (number_literal "1"))) (; ";"))) (goto_statement "goto LAB_00016026;" (goto "goto") (statement_identifier "LAB_00016026") (; ";")) (} "}"))) (expression_statement "sVar5 = __ctype_get_mb_cur_max();" (assignment_expression "sVar5 = __ctype_get_mb_cur_max()" (identifier "sVar5") (= "=") (call_expression "__ctype_get_mb_cur_max()" (identifier "__ctype_get_mb_cur_max") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (sVar5 < 2) {\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }\n    else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }" (if "if") (parenthesized_expression "(sVar5 < 2)" (( "(") (binary_expression "sVar5 < 2" (identifier "sVar5") (< "<") (number_literal "2")) () ")")) (compound_statement "{\n      if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }\n    }" ({ "{") (if_statement "if (local_44 < local_44 + uVar4) {\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }\n      else {\n        local_4c = 0;\n      }" (if "if") (parenthesized_expression "(local_44 < local_44 + uVar4)" (( "(") (binary_expression "local_44 < local_44 + uVar4" (identifier "local_44") (< "<") (binary_expression "local_44 + uVar4" (identifier "local_44") (+ "+") (identifier "uVar4"))) () ")")) (compound_statement "{\n        ppuVar6 = __ctype_b_loc();\n        local_4c = 0;\n        pbVar12 = local_44;\n        do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);\n      }" ({ "{") (expression_statement "ppuVar6 = __ctype_b_loc();" (assignment_expression "ppuVar6 = __ctype_b_loc()" (identifier "ppuVar6") (= "=") (call_expression "__ctype_b_loc()" (identifier "__ctype_b_loc") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "local_4c = 0;" (assignment_expression "local_4c = 0" (identifier "local_4c") (= "=") (number_literal "0")) (; ";")) (expression_statement "pbVar12 = local_44;" (assignment_expression "pbVar12 = local_44" (identifier "pbVar12") (= "=") (identifier "local_44")) (; ";")) (do_statement "do {\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        } while (local_44 + uVar4 != pbVar12);" (do "do") (compound_statement "{\n          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);\n          pbVar12 = pbVar12 + 1;\n        }" ({ "{") (expression_statement "local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);" (assignment_expression "local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0)" (identifier "local_4c") (= "=") (binary_expression "(local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0)" (parenthesized_expression "(local_4c + 1)" (( "(") (binary_expression "local_4c + 1" (identifier "local_4c") (+ "+") (number_literal "1")) () ")")) (- "-") (call_expression "(uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(((*ppuVar6)[*pbVar12] & 0x4000) == 0)" (( "(") (binary_expression "((*ppuVar6)[*pbVar12] & 0x4000) == 0" (parenthesized_expression "((*ppuVar6)[*pbVar12] & 0x4000)" (( "(") (binary_expression "(*ppuVar6)[*pbVar12] & 0x4000" (subscript_expression "(*ppuVar6)[*pbVar12]" (parenthesized_expression "(*ppuVar6)" (( "(") (pointer_expression "*ppuVar6" (* "*") (identifier "ppuVar6")) () ")")) ([ "[") (pointer_expression "*pbVar12" (* "*") (identifier "pbVar12")) (] "]")) (& "&") (number_literal "0x4000")) () ")")) (== "==") (number_literal "0")) () ")"))))) (; ";")) (expression_statement "pbVar12 = pbVar12 + 1;" (assignment_expression "pbVar12 = pbVar12 + 1" (identifier "pbVar12") (= "=") (binary_expression "pbVar12 + 1" (identifier "pbVar12") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(local_44 + uVar4 != pbVar12)" (( "(") (binary_expression "local_44 + uVar4 != pbVar12" (binary_expression "local_44 + uVar4" (identifier "local_44") (+ "+") (identifier "uVar4")) (!= "!=") (identifier "pbVar12")) () ")")) (; ";")) (} "}")) (else_clause "else {\n        local_4c = 0;\n      }" (else "else") (compound_statement "{\n        local_4c = 0;\n      }" ({ "{") (expression_statement "local_4c = 0;" (assignment_expression "local_4c = 0" (identifier "local_4c") (= "=") (number_literal "0")) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }" (else "else") (compound_statement "{\n      local_4c = FUN_0001f960(local_44,uVar4,0);\n    }" ({ "{") (expression_statement "local_4c = FUN_0001f960(local_44,uVar4,0);" (assignment_expression "local_4c = FUN_0001f960(local_44,uVar4,0)" (identifier "local_4c") (= "=") (call_expression "FUN_0001f960(local_44,uVar4,0)" (identifier "FUN_0001f960") (argument_list "(local_44,uVar4,0)" (( "(") (identifier "local_44") (, ",") (identifier "uVar4") (, ",") (number_literal "0") () ")")))) (; ";")) (} "}")))) (if_statement "if (DAT_0003c354 != 0) goto LAB_00016015;" (if "if") (parenthesized_expression "(DAT_0003c354 != 0)" (( "(") (binary_expression "DAT_0003c354 != 0" (identifier "DAT_0003c354") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00016015;" (goto "goto") (statement_identifier "LAB_00016015") (; ";"))) (expression_statement "*param_6 = 0;" (assignment_expression "*param_6 = 0" (pointer_expression "*param_6" (* "*") (identifier "param_6")) (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }\n    uVar4 = strlen((char *)param_2);\n    if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }\n    memcpy(local_44,param_2,uVar4 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = uVar4;\n    sVar5 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }\n    bVar14 = DAT_0003c354;\n    if (DAT_0003c354 != 0) goto LAB_00016015;\nLAB_00016026:\n    *param_6 = bVar14;\n    if (param_5 == (uint *)0x0) goto LAB_0001603e;\n  }" (else "else") (compound_statement "{\n    if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }\n    uVar4 = strlen((char *)param_2);\n    if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }\n    memcpy(local_44,param_2,uVar4 + 1);\n    local_35 = false;\nLAB_00015fbc:\n    local_4c = uVar4;\n    sVar5 = __ctype_get_mb_cur_max();\n    pbVar12 = local_44 + local_4c;\n    if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }\n    bVar14 = DAT_0003c354;\n    if (DAT_0003c354 != 0) goto LAB_00016015;\nLAB_00016026:\n    *param_6 = bVar14;\n    if (param_5 == (uint *)0x0) goto LAB_0001603e;\n  }" ({ "{") (if_statement "if (param_4 != 0) {\n      bVar3 = true;\n      goto LAB_00015e76;\n    }" (if "if") (parenthesized_expression "(param_4 != 0)" (( "(") (binary_expression "param_4 != 0" (identifier "param_4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      bVar3 = true;\n      goto LAB_00015e76;\n    }" ({ "{") (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" (identifier "bVar3") (= "=") (true "true")) (; ";")) (goto_statement "goto LAB_00015e76;" (goto "goto") (statement_identifier "LAB_00015e76") (; ";")) (} "}"))) (expression_statement "uVar4 = strlen((char *)param_2);" (assignment_expression "uVar4 = strlen((char *)param_2)" (identifier "uVar4") (= "=") (call_expression "strlen((char *)param_2)" (identifier "strlen") (argument_list "((char *)param_2)" (( "(") (cast_expression "(char *)param_2" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_2")) () ")")))) (; ";")) (if_statement "if (0x1fff < uVar4) {\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }" (if "if") (parenthesized_expression "(0x1fff < uVar4)" (( "(") (binary_expression "0x1fff < uVar4" (number_literal "0x1fff") (< "<") (identifier "uVar4")) () ")")) (compound_statement "{\n      local_44 = (byte *)FUN_00023f30(uVar4 + 1);\n    }" ({ "{") (expression_statement "local_44 = (byte *)FUN_00023f30(uVar4 + 1);" (assignment_expression "local_44 = (byte *)FUN_00023f30(uVar4 + 1)" (identifier "local_44") (= "=") (cast_expression "(byte *)FUN_00023f30(uVar4 + 1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00023f30(uVar4 + 1)" (identifier "FUN_00023f30") (argument_list "(uVar4 + 1)" (( "(") (binary_expression "uVar4 + 1" (identifier "uVar4") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (} "}"))) (expression_statement "memcpy(local_44,param_2,uVar4 + 1);" (call_expression "memcpy(local_44,param_2,uVar4 + 1)" (identifier "memcpy") (argument_list "(local_44,param_2,uVar4 + 1)" (( "(") (identifier "local_44") (, ",") (identifier "param_2") (, ",") (binary_expression "uVar4 + 1" (identifier "uVar4") (+ "+") (number_literal "1")) () ")"))) (; ";")) (expression_statement "local_35 = false;" (assignment_expression "local_35 = false" (identifier "local_35") (= "=") (false "false")) (; ";")) (labeled_statement "LAB_00015fbc:\n    local_4c = uVar4;" (statement_identifier "LAB_00015fbc") (: ":") (expression_statement "local_4c = uVar4;" (assignment_expression "local_4c = uVar4" (identifier "local_4c") (= "=") (identifier "uVar4")) (; ";"))) (expression_statement "sVar5 = __ctype_get_mb_cur_max();" (assignment_expression "sVar5 = __ctype_get_mb_cur_max()" (identifier "sVar5") (= "=") (call_expression "__ctype_get_mb_cur_max()" (identifier "__ctype_get_mb_cur_max") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pbVar12 = local_44 + local_4c;" (assignment_expression "pbVar12 = local_44 + local_4c" (identifier "pbVar12") (= "=") (binary_expression "local_44 + local_4c" (identifier "local_44") (+ "+") (identifier "local_4c"))) (; ";")) (if_statement "if (sVar5 < 2) {\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }\n    else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }" (if "if") (parenthesized_expression "(sVar5 < 2)" (( "(") (binary_expression "sVar5 < 2" (identifier "sVar5") (< "<") (number_literal "2")) () ")")) (compound_statement "{\n      uVar4 = local_4c;\n      if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }\n    }" ({ "{") (expression_statement "uVar4 = local_4c;" (assignment_expression "uVar4 = local_4c" (identifier "uVar4") (= "=") (identifier "local_4c")) (; ";")) (if_statement "if (local_44 < pbVar12) {\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }" (if "if") (parenthesized_expression "(local_44 < pbVar12)" (( "(") (binary_expression "local_44 < pbVar12" (identifier "local_44") (< "<") (identifier "pbVar12")) () ")")) (compound_statement "{\n        ppuVar6 = __ctype_b_loc();\n        pbVar9 = local_44;\n        do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);\n      }" ({ "{") (expression_statement "ppuVar6 = __ctype_b_loc();" (assignment_expression "ppuVar6 = __ctype_b_loc()" (identifier "ppuVar6") (= "=") (call_expression "__ctype_b_loc()" (identifier "__ctype_b_loc") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pbVar9 = local_44;" (assignment_expression "pbVar9 = local_44" (identifier "pbVar9") (= "=") (identifier "local_44")) (; ";")) (do_statement "do {\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        } while (pbVar9 != pbVar12);" (do "do") (compound_statement "{\n          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }\n          pbVar9 = pbVar9 + 1;\n        }" ({ "{") (if_statement "if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {\n            *pbVar9 = 0x3f;\n          }" (if "if") (parenthesized_expression "((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0)" (( "(") (binary_expression "(*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0" (parenthesized_expression "(*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40)" (( "(") (binary_expression "*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40" (pointer_expression "*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1)" (* "*") (cast_expression "(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1)" (( "(") (binary_expression "(int)*ppuVar6 + (uint)*pbVar9 * 2 + 1" (binary_expression "(int)*ppuVar6 + (uint)*pbVar9 * 2" (cast_expression "(int)*ppuVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*ppuVar6" (* "*") (identifier "ppuVar6"))) (+ "+") (binary_expression "(uint)*pbVar9 * 2" (binary_expression "(uint)*pbVar9" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar9")) (* "*") (number_literal "2"))) (+ "+") (number_literal "1")) () ")")))) (& "&") (number_literal "0x40")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n            *pbVar9 = 0x3f;\n          }" ({ "{") (expression_statement "*pbVar9 = 0x3f;" (assignment_expression "*pbVar9 = 0x3f" (pointer_expression "*pbVar9" (* "*") (identifier "pbVar9")) (= "=") (number_literal "0x3f")) (; ";")) (} "}"))) (expression_statement "pbVar9 = pbVar9 + 1;" (assignment_expression "pbVar9 = pbVar9 + 1" (identifier "pbVar9") (= "=") (binary_expression "pbVar9 + 1" (identifier "pbVar9") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pbVar9 != pbVar12)" (( "(") (binary_expression "pbVar9 != pbVar12" (identifier "pbVar9") (!= "!=") (identifier "pbVar12")) () ")")) (; ";")) (} "}"))) (} "}")) (else_clause "else if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }" (else "else") (if_statement "if (local_44 < pbVar12) {\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }\n    else {\n      local_4c = 0;\n      uVar4 = 0;\n    }" (if "if") (parenthesized_expression "(local_44 < pbVar12)" (( "(") (binary_expression "local_44 < pbVar12" (identifier "local_44") (< "<") (identifier "pbVar12")) () ")")) (compound_statement "{\n      local_4c = 0;\n      local_54 = local_44;\n      pbVar9 = local_44;\n      do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);\n      uVar4 = (int)local_54 - (int)local_44;\n    }" ({ "{") (expression_statement "local_4c = 0;" (assignment_expression "local_4c = 0" (identifier "local_4c") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_54 = local_44;" (assignment_expression "local_54 = local_44" (identifier "local_54") (= "=") (identifier "local_44")) (; ";")) (expression_statement "pbVar9 = local_44;" (assignment_expression "pbVar9 = local_44" (identifier "pbVar9") (= "=") (identifier "local_44")) (; ";")) (do_statement "do {\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      } while (pbVar9 < pbVar12);" (do "do") (compound_statement "{\n        bVar2 = *pbVar9;\n        if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }\n      }" ({ "{") (expression_statement "bVar2 = *pbVar9;" (assignment_expression "bVar2 = *pbVar9" (identifier "bVar2") (= "=") (pointer_expression "*pbVar9" (* "*") (identifier "pbVar9"))) (; ";")) (if_statement "if ((char)bVar2 < '@') {\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }\n        else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }" (if "if") (parenthesized_expression "((char)bVar2 < '@')" (( "(") (binary_expression "(char)bVar2 < '@'" (cast_expression "(char)bVar2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "bVar2")) (< "<") (char_literal "'@'" (' "'") (character "@") (' "'"))) () ")")) (compound_statement "{\n          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;\nLAB_0001609c:\n          local_4c = local_4c + 1;\n          pbVar9 = pbVar9 + 1;\n          *local_54 = bVar2;\n          local_54 = local_54 + 1;\n        }" ({ "{") (if_statement "if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;" (if "if") (parenthesized_expression "(((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20)))" (( "(") (binary_expression "((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))" (parenthesized_expression "((char)bVar2 < '%')" (( "(") (binary_expression "(char)bVar2 < '%'" (cast_expression "(char)bVar2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "bVar2")) (< "<") (char_literal "'%'" (' "'") (character "%") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(3 < (byte)(bVar2 - 0x20))" (( "(") (binary_expression "3 < (byte)(bVar2 - 0x20)" (number_literal "3") (< "<") (call_expression "(byte)(bVar2 - 0x20)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(bVar2 - 0x20)" (( "(") (binary_expression "bVar2 - 0x20" (identifier "bVar2") (- "-") (number_literal "0x20")) () ")")))) () ")"))) () ")")) (goto_statement "goto LAB_000160d2;" (goto "goto") (statement_identifier "LAB_000160d2") (; ";"))) (labeled_statement "LAB_0001609c:\n          local_4c = local_4c + 1;" (statement_identifier "LAB_0001609c") (: ":") (expression_statement "local_4c = local_4c + 1;" (assignment_expression "local_4c = local_4c + 1" (identifier "local_4c") (= "=") (binary_expression "local_4c + 1" (identifier "local_4c") (+ "+") (number_literal "1"))) (; ";"))) (expression_statement "pbVar9 = pbVar9 + 1;" (assignment_expression "pbVar9 = pbVar9 + 1" (identifier "pbVar9") (= "=") (binary_expression "pbVar9 + 1" (identifier "pbVar9") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*local_54 = bVar2;" (assignment_expression "*local_54 = bVar2" (pointer_expression "*local_54" (* "*") (identifier "local_54")) (= "=") (identifier "bVar2")) (; ";")) (expression_statement "local_54 = local_54 + 1;" (assignment_expression "local_54 = local_54 + 1" (identifier "local_54") (= "=") (binary_expression "local_54 + 1" (identifier "local_54") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (else_clause "else {\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }" (else "else") (compound_statement "{\n          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;\nLAB_000160d2:\n          local_28.__count = 0;\n          local_28.__value.__wch = 0;\n          pbVar11 = pbVar9;\n          do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);\n        }" ({ "{") (if_statement "if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))\n          goto LAB_0001609c;" (if "if") (parenthesized_expression "(('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))" (( "(") (binary_expression "('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e)))" (parenthesized_expression "('@' < (char)bVar2)" (( "(") (binary_expression "'@' < (char)bVar2" (char_literal "'@'" (' "'") (character "@") (' "'")) (< "<") (cast_expression "(char)bVar2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "bVar2"))) () ")")) (&& "&&") (parenthesized_expression "(((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e)))" (( "(") (parenthesized_expression "((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))" (( "(") (binary_expression "(char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e)" (binary_expression "(char)bVar2 < '`'" (cast_expression "(char)bVar2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "bVar2")) (< "<") (char_literal "'`'" (' "'") (character "`") (' "'"))) (|| "||") (parenthesized_expression "((byte)(bVar2 + 0x9f) < 0x1e)" (( "(") (binary_expression "(byte)(bVar2 + 0x9f) < 0x1e" (call_expression "(byte)(bVar2 + 0x9f)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(bVar2 + 0x9f)" (( "(") (binary_expression "bVar2 + 0x9f" (identifier "bVar2") (+ "+") (number_literal "0x9f")) () ")"))) (< "<") (number_literal "0x1e")) () ")"))) () ")")) () ")"))) () ")")) (goto_statement "goto LAB_0001609c;" (goto "goto") (statement_identifier "LAB_0001609c") (; ";"))) (labeled_statement "LAB_000160d2:\n          local_28.__count = 0;" (statement_identifier "LAB_000160d2") (: ":") (expression_statement "local_28.__count = 0;" (assignment_expression "local_28.__count = 0" (field_expression "local_28.__count" (identifier "local_28") (. ".") (field_identifier "__count")) (= "=") (number_literal "0")) (; ";"))) (expression_statement "local_28.__value.__wch = 0;" (assignment_expression "local_28.__value.__wch = 0" (field_expression "local_28.__value.__wch" (field_expression "local_28.__value" (identifier "local_28") (. ".") (field_identifier "__value")) (. ".") (field_identifier "__wch")) (= "=") (number_literal "0")) (; ";")) (expression_statement "pbVar11 = pbVar9;" (assignment_expression "pbVar11 = pbVar9" (identifier "pbVar11") (= "=") (identifier "pbVar9")) (; ";")) (do_statement "do {\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          } while (iVar7 == 0);" (do "do") (compound_statement "{\n            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);\n            pbVar1 = local_54 + 1;\n            if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }\n            if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }\n            if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }\n            iVar7 = mbsinit(&local_28);\n            pbVar11 = pbVar9;\n          }" ({ "{") (expression_statement "iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);" (assignment_expression "iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28)" (identifier "iVar7") (= "=") (call_expression "FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28)" (identifier "FUN_00029110") (argument_list "(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28)" (( "(") (pointer_expression "&local_2c" (& "&") (identifier "local_2c")) (, ",") (identifier "pbVar11") (, ",") (binary_expression "(int)pbVar12 - (int)pbVar11" (cast_expression "(int)pbVar12" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar12")) (- "-") (cast_expression "(int)pbVar11" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar11"))) (, ",") (pointer_expression "&local_28" (& "&") (identifier "local_28")) () ")")))) (; ";")) (expression_statement "pbVar1 = local_54 + 1;" (assignment_expression "pbVar1 = local_54 + 1" (identifier "pbVar1") (= "=") (binary_expression "local_54 + 1" (identifier "local_54") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (iVar7 == -1) {\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }" (if "if") (parenthesized_expression "(iVar7 == -1)" (( "(") (binary_expression "iVar7 == -1" (identifier "iVar7") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n              pbVar9 = pbVar11 + 1;\n              *local_54 = 0x3f;\nLAB_000161e7:\n              local_4c = local_4c + 1;\n              local_54 = pbVar1;\n              break;\n            }" ({ "{") (expression_statement "pbVar9 = pbVar11 + 1;" (assignment_expression "pbVar9 = pbVar11 + 1" (identifier "pbVar9") (= "=") (binary_expression "pbVar11 + 1" (identifier "pbVar11") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*local_54 = 0x3f;" (assignment_expression "*local_54 = 0x3f" (pointer_expression "*local_54" (* "*") (identifier "local_54")) (= "=") (number_literal "0x3f")) (; ";")) (labeled_statement "LAB_000161e7:\n              local_4c = local_4c + 1;" (statement_identifier "LAB_000161e7") (: ":") (expression_statement "local_4c = local_4c + 1;" (assignment_expression "local_4c = local_4c + 1" (identifier "local_4c") (= "=") (binary_expression "local_4c + 1" (identifier "local_4c") (+ "+") (number_literal "1"))) (; ";"))) (expression_statement "local_54 = pbVar1;" (assignment_expression "local_54 = pbVar1" (identifier "local_54") (= "=") (identifier "pbVar1")) (; ";")) (break_statement "break;" (break "break") (; ";")) (} "}"))) (if_statement "if (iVar7 == -2) {\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }" (if "if") (parenthesized_expression "(iVar7 == -2)" (( "(") (binary_expression "iVar7 == -2" (identifier "iVar7") (== "==") (number_literal "-2")) () ")")) (compound_statement "{\n              *local_54 = 0x3f;\n              pbVar9 = pbVar12;\n              goto LAB_000161e7;\n            }" ({ "{") (expression_statement "*local_54 = 0x3f;" (assignment_expression "*local_54 = 0x3f" (pointer_expression "*local_54" (* "*") (identifier "local_54")) (= "=") (number_literal "0x3f")) (; ";")) (expression_statement "pbVar9 = pbVar12;" (assignment_expression "pbVar9 = pbVar12" (identifier "pbVar9") (= "=") (identifier "pbVar12")) (; ";")) (goto_statement "goto LAB_000161e7;" (goto "goto") (statement_identifier "LAB_000161e7") (; ";")) (} "}"))) (if_statement "if (iVar7 == 0) {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }\n            else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }" (if "if") (parenthesized_expression "(iVar7 == 0)" (( "(") (binary_expression "iVar7 == 0" (identifier "iVar7") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + 1;\n              if (iVar8 < 0) goto LAB_000160ff;\n              *local_54 = *pbVar11;\n              pbVar10 = pbVar9;\n              local_54 = pbVar1;\nLAB_00016181:\n              local_4c = local_4c + iVar8;\n              pbVar9 = pbVar10;\n            }" ({ "{") (expression_statement "iVar8 = wcwidth(local_2c);" (assignment_expression "iVar8 = wcwidth(local_2c)" (identifier "iVar8") (= "=") (call_expression "wcwidth(local_2c)" (identifier "wcwidth") (argument_list "(local_2c)" (( "(") (identifier "local_2c") () ")")))) (; ";")) (expression_statement "pbVar9 = pbVar11 + 1;" (assignment_expression "pbVar9 = pbVar11 + 1" (identifier "pbVar9") (= "=") (binary_expression "pbVar11 + 1" (identifier "pbVar11") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (iVar8 < 0) goto LAB_000160ff;" (if "if") (parenthesized_expression "(iVar8 < 0)" (( "(") (binary_expression "iVar8 < 0" (identifier "iVar8") (< "<") (number_literal "0")) () ")")) (goto_statement "goto LAB_000160ff;" (goto "goto") (statement_identifier "LAB_000160ff") (; ";"))) (expression_statement "*local_54 = *pbVar11;" (assignment_expression "*local_54 = *pbVar11" (pointer_expression "*local_54" (* "*") (identifier "local_54")) (= "=") (pointer_expression "*pbVar11" (* "*") (identifier "pbVar11"))) (; ";")) (expression_statement "pbVar10 = pbVar9;" (assignment_expression "pbVar10 = pbVar9" (identifier "pbVar10") (= "=") (identifier "pbVar9")) (; ";")) (expression_statement "local_54 = pbVar1;" (assignment_expression "local_54 = pbVar1" (identifier "local_54") (= "=") (identifier "pbVar1")) (; ";")) (labeled_statement "LAB_00016181:\n              local_4c = local_4c + iVar8;" (statement_identifier "LAB_00016181") (: ":") (expression_statement "local_4c = local_4c + iVar8;" (assignment_expression "local_4c = local_4c + iVar8" (identifier "local_4c") (= "=") (binary_expression "local_4c + iVar8" (identifier "local_4c") (+ "+") (identifier "iVar8"))) (; ";"))) (expression_statement "pbVar9 = pbVar10;" (assignment_expression "pbVar9 = pbVar10" (identifier "pbVar9") (= "=") (identifier "pbVar10")) (; ";")) (} "}")) (else_clause "else {\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }" (else "else") (compound_statement "{\n              iVar8 = wcwidth(local_2c);\n              pbVar9 = pbVar11 + iVar7;\n              pbVar13 = local_54;\n              if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }\nLAB_000160ff:\n              local_4c = local_4c + 1;\n              *local_54 = 0x3f;\n              local_54 = pbVar1;\n            }" ({ "{") (expression_statement "iVar8 = wcwidth(local_2c);" (assignment_expression "iVar8 = wcwidth(local_2c)" (identifier "iVar8") (= "=") (call_expression "wcwidth(local_2c)" (identifier "wcwidth") (argument_list "(local_2c)" (( "(") (identifier "local_2c") () ")")))) (; ";")) (expression_statement "pbVar9 = pbVar11 + iVar7;" (assignment_expression "pbVar9 = pbVar11 + iVar7" (identifier "pbVar9") (= "=") (binary_expression "pbVar11 + iVar7" (identifier "pbVar11") (+ "+") (identifier "iVar7"))) (; ";")) (expression_statement "pbVar13 = local_54;" (assignment_expression "pbVar13 = local_54" (identifier "pbVar13") (= "=") (identifier "local_54")) (; ";")) (if_statement "if (-1 < iVar8) {\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }" (if "if") (parenthesized_expression "(-1 < iVar8)" (( "(") (binary_expression "-1 < iVar8" (number_literal "-1") (< "<") (identifier "iVar8")) () ")")) (compound_statement "{\n                do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);\n                local_54 = local_54 + iVar7;\n                goto LAB_00016181;\n              }" ({ "{") (do_statement "do {\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                } while (pbVar10 != pbVar9);" (do "do") (compound_statement "{\n                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;\n                  *pbVar13 = *pbVar11;\n                  pbVar11 = pbVar10;\n                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;\n                }" ({ "{") (expression_statement "pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;" (assignment_expression "pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1" (identifier "pbVar10") (= "=") (binary_expression "pbVar11 + (uint)bVar14 * -2 + 1" (binary_expression "pbVar11 + (uint)bVar14 * -2" (identifier "pbVar11") (+ "+") (binary_expression "(uint)bVar14 * -2" (cast_expression "(uint)bVar14" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar14")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*pbVar13 = *pbVar11;" (assignment_expression "*pbVar13 = *pbVar11" (pointer_expression "*pbVar13" (* "*") (identifier "pbVar13")) (= "=") (pointer_expression "*pbVar11" (* "*") (identifier "pbVar11"))) (; ";")) (expression_statement "pbVar11 = pbVar10;" (assignment_expression "pbVar11 = pbVar10" (identifier "pbVar11") (= "=") (identifier "pbVar10")) (; ";")) (expression_statement "pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;" (assignment_expression "pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1" (identifier "pbVar13") (= "=") (binary_expression "pbVar13 + (uint)bVar14 * -2 + 1" (binary_expression "pbVar13 + (uint)bVar14 * -2" (identifier "pbVar13") (+ "+") (binary_expression "(uint)bVar14 * -2" (cast_expression "(uint)bVar14" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar14")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pbVar10 != pbVar9)" (( "(") (binary_expression "pbVar10 != pbVar9" (identifier "pbVar10") (!= "!=") (identifier "pbVar9")) () ")")) (; ";")) (expression_statement "local_54 = local_54 + iVar7;" (assignment_expression "local_54 = local_54 + iVar7" (identifier "local_54") (= "=") (binary_expression "local_54 + iVar7" (identifier "local_54") (+ "+") (identifier "iVar7"))) (; ";")) (goto_statement "goto LAB_00016181;" (goto "goto") (statement_identifier "LAB_00016181") (; ";")) (} "}"))) (labeled_statement "LAB_000160ff:\n              local_4c = local_4c + 1;" (statement_identifier "LAB_000160ff") (: ":") (expression_statement "local_4c = local_4c + 1;" (assignment_expression "local_4c = local_4c + 1" (identifier "local_4c") (= "=") (binary_expression "local_4c + 1" (identifier "local_4c") (+ "+") (number_literal "1"))) (; ";"))) (expression_statement "*local_54 = 0x3f;" (assignment_expression "*local_54 = 0x3f" (pointer_expression "*local_54" (* "*") (identifier "local_54")) (= "=") (number_literal "0x3f")) (; ";")) (expression_statement "local_54 = pbVar1;" (assignment_expression "local_54 = pbVar1" (identifier "local_54") (= "=") (identifier "pbVar1")) (; ";")) (} "}")))) (expression_statement "iVar7 = mbsinit(&local_28);" (assignment_expression "iVar7 = mbsinit(&local_28)" (identifier "iVar7") (= "=") (call_expression "mbsinit(&local_28)" (identifier "mbsinit") (argument_list "(&local_28)" (( "(") (pointer_expression "&local_28" (& "&") (identifier "local_28")) () ")")))) (; ";")) (expression_statement "pbVar11 = pbVar9;" (assignment_expression "pbVar11 = pbVar9" (identifier "pbVar11") (= "=") (identifier "pbVar9")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar7 == 0)" (( "(") (binary_expression "iVar7 == 0" (identifier "iVar7") (== "==") (number_literal "0")) () ")")) (; ";")) (} "}")))) (} "}")) (while "while") (parenthesized_expression "(pbVar9 < pbVar12)" (( "(") (binary_expression "pbVar9 < pbVar12" (identifier "pbVar9") (< "<") (identifier "pbVar12")) () ")")) (; ";")) (expression_statement "uVar4 = (int)local_54 - (int)local_44;" (assignment_expression "uVar4 = (int)local_54 - (int)local_44" (identifier "uVar4") (= "=") (binary_expression "(int)local_54 - (int)local_44" (cast_expression "(int)local_54" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_54")) (- "-") (cast_expression "(int)local_44" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_44")))) (; ";")) (} "}")) (else_clause "else {\n      local_4c = 0;\n      uVar4 = 0;\n    }" (else "else") (compound_statement "{\n      local_4c = 0;\n      uVar4 = 0;\n    }" ({ "{") (expression_statement "local_4c = 0;" (assignment_expression "local_4c = 0" (identifier "local_4c") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (} "}")))))) (expression_statement "bVar14 = DAT_0003c354;" (assignment_expression "bVar14 = DAT_0003c354" (identifier "bVar14") (= "=") (identifier "DAT_0003c354")) (; ";")) (if_statement "if (DAT_0003c354 != 0) goto LAB_00016015;" (if "if") (parenthesized_expression "(DAT_0003c354 != 0)" (( "(") (binary_expression "DAT_0003c354 != 0" (identifier "DAT_0003c354") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00016015;" (goto "goto") (statement_identifier "LAB_00016015") (; ";"))) (labeled_statement "LAB_00016026:\n    *param_6 = bVar14;" (statement_identifier "LAB_00016026") (: ":") (expression_statement "*param_6 = bVar14;" (assignment_expression "*param_6 = bVar14" (pointer_expression "*param_6" (* "*") (identifier "param_6")) (= "=") (identifier "bVar14")) (; ";"))) (if_statement "if (param_5 == (uint *)0x0) goto LAB_0001603e;" (if "if") (parenthesized_expression "(param_5 == (uint *)0x0)" (( "(") (binary_expression "param_5 == (uint *)0x0" (identifier "param_5") (== "==") (cast_expression "(uint *)0x0" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_0001603e;" (goto "goto") (statement_identifier "LAB_0001603e") (; ";"))) (} "}")))) (expression_statement "*param_5 = local_4c;" (assignment_expression "*param_5 = local_4c" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "local_4c")) (; ";")) (labeled_statement "LAB_0001603e:\n  *param_1 = local_44;" (statement_identifier "LAB_0001603e") (: ":") (expression_statement "*param_1 = local_44;" (assignment_expression "*param_1 = local_44" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "local_44")) (; ";"))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b190();\n  }" (if "if") (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_0002b190();\n  }" ({ "{") (expression_statement "FUN_0002b190();" (call_expression "FUN_0002b190()" (identifier "FUN_0002b190") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

size_t __regparm3
function_1(char **inbuf,size_t bufsize,char *name,type_1 *var_6,
              int var_12,size_t *width,type_2 *pad)

{
  type_3 *pbVar1;
  type_3 var_24;
  int var_33;
  bool bVar4;
  type_4 var_3;
  size_t var_9;
  size_t var_11;
  type_5 **ppuVar8;
  int var_29;
  type_3 *var_23;
  type_3 *var_31;
  type_3 *var_20;
  type_3 *var_30;
  int var_1;
  type_3 bVar14;
  type_3 *var_25;
  size_t var_19;
  type_3 *var_17;
  bool var_15;
  type_6 wc;
  type_7 mbstate;
  type_3 *var_27;
  
  bVar14 = 0;
  var_17 = (type_3 *)*inbuf;
  var_33 = *(int *)(var_1 + 0x14);
  var_3 = var_2((type_1 *)name);
  if ((var_3 < var_4 & var_5) == 0) {
    bVar4 = false;
    if (var_6 == (type_1 *)0x0) {
      var_9 = var_7((char *)bufsize);
      var_15 = false;
      var_17 = (type_3 *)bufsize;
    }
    else {
LAB_00015e76:
      var_9 = var_8((char *)var_17,0x2000,(char *)bufsize,0xffffffff,
                              (type_1 *)name);
      if (0x1fff < var_9) {
        var_17 = (type_3 *)var_10(var_9 + 1);
        var_8((char *)var_17,var_9 + 1,(char *)bufsize,0xffffffff,
                        (type_1 *)name);
      }
      var_15 = true;
      if (*(type_3 *)bufsize == *var_17) {
        var_11 = var_7((char *)bufsize);
        var_15 = var_9 != var_11;
      }
      if (bVar4) goto LAB_00015fbc;
    }
    if (var_12 == 0) {
      if (var_13 == false) {
        *(type_8 *)width = 0;
        goto LAB_0001603e;
      }
LAB_00016015:
      bVar14 = (var_14 ^ 1U | var_15) ^ 1;
      goto LAB_00016026;
    }
    var_11 = var_16();
    if (var_11 < 2) {
      if (var_17 < var_17 + var_9) {
        ppuVar8 = var_18();
        var_19 = 0;
        var_20 = var_17;
        do {
          var_19 = (var_19 + 1) - (type_9)(((*ppuVar8)[*var_20] & 0x4000) == 0);
          var_20 = var_20 + 1;
        } while (var_17 + var_9 != var_20);
      }
      else {
        var_19 = 0;
      }
    }
    else {
      var_19 = var_21((char *)var_17,var_9,0);
    }
    if (var_13 != false) goto LAB_00016015;
    *(type_8 *)width = 0;
  }
  else {
    if (var_6 != (type_1 *)0x0) {
      bVar4 = true;
      goto LAB_00015e76;
    }
    var_9 = var_7((char *)bufsize);
    if (0x1fff < var_9) {
      var_17 = (type_3 *)var_10(var_9 + 1);
    }
    var_22(var_17,(void *)bufsize,var_9 + 1);
    var_15 = false;
LAB_00015fbc:
    var_19 = var_9;
    var_11 = var_16();
    var_20 = var_17 + var_19;
    if (var_11 < 2) {
      var_9 = var_19;
      if (var_17 < var_20) {
        ppuVar8 = var_18();
        var_23 = var_17;
        do {
          if ((*(type_3 *)((int)*ppuVar8 + (type_9)*var_23 * 2 + 1) & 0x40) == 0) {
            *var_23 = 0x3f;
          }
          var_23 = var_23 + 1;
        } while (var_23 != var_20);
      }
    }
    else if (var_17 < var_20) {
      var_19 = 0;
      var_25 = var_17;
      var_23 = var_17;
      do {
        var_24 = *var_23;
        if ((char)var_24 < '@') {
          if (((char)var_24 < '%') && (3 < (type_3)(var_24 - 0x20))) goto LAB_000160d2;
LAB_0001609c:
          var_19 = var_19 + 1;
          var_23 = var_23 + 1;
          *var_25 = var_24;
          var_25 = var_25 + 1;
        }
        else {
          if (('@' < (char)var_24) && (((char)var_24 < '`' || ((type_3)(var_24 + 0x9f) < 0x1e))))
          goto LAB_0001609c;
LAB_000160d2:
          mbstate.__count = 0;
          mbstate.__value.__wch = 0;
          var_27 = var_23;
          do {
            var_9 = var_26(&wc,(char *)var_27,(int)var_20 - (int)var_27,&mbstate);
            pbVar1 = var_25 + 1;
            if (var_9 == 0xffffffff) {
              var_23 = var_27 + 1;
              *var_25 = 0x3f;
LAB_000161e7:
              var_19 = var_19 + 1;
              var_25 = pbVar1;
              break;
            }
            if (var_9 == 0xfffffffe) {
              *var_25 = 0x3f;
              var_23 = var_20;
              goto LAB_000161e7;
            }
            if (var_9 == 0) {
              var_29 = var_28(wc);
              var_23 = var_27 + 1;
              if (var_29 < 0) goto LAB_000160ff;
              *var_25 = *var_27;
              var_31 = var_23;
              var_25 = pbVar1;
LAB_00016181:
              var_19 = var_19 + var_29;
              var_23 = var_31;
            }
            else {
              var_29 = var_28(wc);
              var_23 = var_27 + var_9;
              var_30 = var_25;
              if (-1 < var_29) {
                do {
                  var_31 = var_27 + (type_9)bVar14 * -2 + 1;
                  *var_30 = *var_27;
                  var_27 = var_31;
                  var_30 = var_30 + (type_9)bVar14 * -2 + 1;
                } while (var_31 != var_23);
                var_25 = var_25 + var_9;
                goto LAB_00016181;
              }
LAB_000160ff:
              var_19 = var_19 + 1;
              *var_25 = 0x3f;
              var_25 = pbVar1;
            }
            var_29 = var_32((type_7 *)&mbstate);
            var_27 = var_23;
          } while (var_29 == 0);
        }
      } while (var_23 < var_20);
      var_9 = (int)var_25 - (int)var_17;
    }
    else {
      var_19 = 0;
      var_9 = 0;
    }
    bVar14 = var_13;
    if (var_13 != false) goto LAB_00016015;
LAB_00016026:
    *(type_3 *)width = bVar14;
    if (var_12 == 0) goto LAB_0001603e;
  }
  *(size_t *)var_12 = var_19;
LAB_0001603e:
  *inbuf = (char *)var_17;
  if (var_33 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_34();
  }
  return var_9;
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

uint __regparm3
MASKED(undefined4 *param_1,byte *param_2,undefined4 param_3,int param_4,uint *param_5,
            byte *param_6)

{
  byte *pbVar1;
  byte bVar2;
  bool bVar3;
  uint uVar4;
  size_t sVar5;
  ushort **ppuVar6;
  int iVar7;
  int iVar8;
  byte *pbVar9;
  byte *pbVar10;
  byte *pbVar12;
  byte *pbVar13;
  int in_GS_OFFSET;
  byte bVar14;
  byte *local_54;
  uint local_4c;
  byte *local_44;
  bool local_35;
  wchar_t local_2c;
  mbstate_t local_28;
  int local_20;
  undefined4 uStack_14;
  byte *pbVar11;
  
  bVar14 = 0;
  uStack_14 = 0x15e1d;
  local_44 = (byte *)*param_1;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  uVar4 = FUN_00022de0(param_3);
  if ((uVar4 < 3 & DAT_0003c2bc) == 0) {
    bVar3 = false;
    if (param_4 == 0) {
      uVar4 = strlen((char *)param_2);
      local_35 = false;
      local_44 = param_2;
    }
    else {
LAB_00015e76:
      uVar4 = FUN_00022f00(local_44,0x2000,param_2,0xffffffff,param_3);
      if (0x1fff < uVar4) {
        local_44 = (byte *)FUN_00023f30(uVar4 + 1);
        FUN_00022f00(local_44,uVar4 + 1,param_2,0xffffffff,param_3);
      }
      local_35 = true;
      if (*param_2 == *local_44) {
        sVar5 = strlen((char *)param_2);
        local_35 = uVar4 != sVar5;
      }
      if (bVar3) goto LAB_00015fbc;
    }
    if (param_5 == (uint *)0x0) {
      if (DAT_0003c354 == 0) {
        *param_6 = 0;
        goto LAB_0001603e;
      }
LAB_00016015:
      bVar14 = (DAT_0003c355 ^ 1 | local_35) ^ 1;
      goto LAB_00016026;
    }
    sVar5 = __ctype_get_mb_cur_max();
    if (sVar5 < 2) {
      if (local_44 < local_44 + uVar4) {
        ppuVar6 = __ctype_b_loc();
        local_4c = 0;
        pbVar12 = local_44;
        do {
          local_4c = (local_4c + 1) - (uint)(((*ppuVar6)[*pbVar12] & 0x4000) == 0);
          pbVar12 = pbVar12 + 1;
        } while (local_44 + uVar4 != pbVar12);
      }
      else {
        local_4c = 0;
      }
    }
    else {
      local_4c = FUN_0001f960(local_44,uVar4,0);
    }
    if (DAT_0003c354 != 0) goto LAB_00016015;
    *param_6 = 0;
  }
  else {
    if (param_4 != 0) {
      bVar3 = true;
      goto LAB_00015e76;
    }
    uVar4 = strlen((char *)param_2);
    if (0x1fff < uVar4) {
      local_44 = (byte *)FUN_00023f30(uVar4 + 1);
    }
    memcpy(local_44,param_2,uVar4 + 1);
    local_35 = false;
LAB_00015fbc:
    local_4c = uVar4;
    sVar5 = __ctype_get_mb_cur_max();
    pbVar12 = local_44 + local_4c;
    if (sVar5 < 2) {
      uVar4 = local_4c;
      if (local_44 < pbVar12) {
        ppuVar6 = __ctype_b_loc();
        pbVar9 = local_44;
        do {
          if ((*(byte *)((int)*ppuVar6 + (uint)*pbVar9 * 2 + 1) & 0x40) == 0) {
            *pbVar9 = 0x3f;
          }
          pbVar9 = pbVar9 + 1;
        } while (pbVar9 != pbVar12);
      }
    }
    else if (local_44 < pbVar12) {
      local_4c = 0;
      local_54 = local_44;
      pbVar9 = local_44;
      do {
        bVar2 = *pbVar9;
        if ((char)bVar2 < '@') {
          if (((char)bVar2 < '%') && (3 < (byte)(bVar2 - 0x20))) goto LAB_000160d2;
LAB_0001609c:
          local_4c = local_4c + 1;
          pbVar9 = pbVar9 + 1;
          *local_54 = bVar2;
          local_54 = local_54 + 1;
        }
        else {
          if (('@' < (char)bVar2) && (((char)bVar2 < '`' || ((byte)(bVar2 + 0x9f) < 0x1e))))
          goto LAB_0001609c;
LAB_000160d2:
          local_28.__count = 0;
          local_28.__value.__wch = 0;
          pbVar11 = pbVar9;
          do {
            iVar7 = FUN_00029110(&local_2c,pbVar11,(int)pbVar12 - (int)pbVar11,&local_28);
            pbVar1 = local_54 + 1;
            if (iVar7 == -1) {
              pbVar9 = pbVar11 + 1;
              *local_54 = 0x3f;
LAB_000161e7:
              local_4c = local_4c + 1;
              local_54 = pbVar1;
              break;
            }
            if (iVar7 == -2) {
              *local_54 = 0x3f;
              pbVar9 = pbVar12;
              goto LAB_000161e7;
            }
            if (iVar7 == 0) {
              iVar8 = wcwidth(local_2c);
              pbVar9 = pbVar11 + 1;
              if (iVar8 < 0) goto LAB_000160ff;
              *local_54 = *pbVar11;
              pbVar10 = pbVar9;
              local_54 = pbVar1;
LAB_00016181:
              local_4c = local_4c + iVar8;
              pbVar9 = pbVar10;
            }
            else {
              iVar8 = wcwidth(local_2c);
              pbVar9 = pbVar11 + iVar7;
              pbVar13 = local_54;
              if (-1 < iVar8) {
                do {
                  pbVar10 = pbVar11 + (uint)bVar14 * -2 + 1;
                  *pbVar13 = *pbVar11;
                  pbVar11 = pbVar10;
                  pbVar13 = pbVar13 + (uint)bVar14 * -2 + 1;
                } while (pbVar10 != pbVar9);
                local_54 = local_54 + iVar7;
                goto LAB_00016181;
              }
LAB_000160ff:
              local_4c = local_4c + 1;
              *local_54 = 0x3f;
              local_54 = pbVar1;
            }
            iVar7 = mbsinit(&local_28);
            pbVar11 = pbVar9;
          } while (iVar7 == 0);
        }
      } while (pbVar9 < pbVar12);
      uVar4 = (int)local_54 - (int)local_44;
    }
    else {
      local_4c = 0;
      uVar4 = 0;
    }
    bVar14 = DAT_0003c354;
    if (DAT_0003c354 != 0) goto LAB_00016015;
LAB_00016026:
    *param_6 = bVar14;
    if (param_5 == (uint *)0x0) goto LAB_0001603e;
  }
  *param_5 = local_4c;
LAB_0001603e:
  *param_1 = local_44;
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0002b190();
  }
  return uVar4;
}

