
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::codecvt<wchar_t, char, __mbstate_t>::do_out(__mbstate_t&, wchar_t const*, wchar_t const*,
   wchar_t const*&, char*, char*, char*&) const */

int __thiscall
std::codecvt<wchar_t,char,__mbstate_t>::do_out
          (codecvt<wchar_t,char,__mbstate_t> *this,__mbstate_t *param_1,wchar_t *param_2,
          wchar_t *param_3,wchar_t **param_4,char *param_5,char *param_6,char **param_7)

{
  undefined4 uVar1;
  wchar_t *pwVar2;
  char *pcVar3;
  wchar_t *pwVar4;
  int iVar5;
  size_t sVar6;
  mbstate_t local_34;
  char local_2c [24];
  undefined4 uStack_14;
  
  iVar5 = 0;
  uStack_14 = 0x27af6b;
  local_34.__value = param_1->__value;
  local_34.__count = param_1->__count;
  uVar1 = __uselocale(*(undefined4 *)(this + 8));
  *param_4 = param_2;
  *param_7 = param_5;
joined_r0x0027afb1:
  do {
    if (((param_3 <= param_2) || (pcVar3 = *param_7, param_6 <= pcVar3)) || (iVar5 != 0)) {
LAB_0027b059:
      __uselocale(uVar1);
      return iVar5;
    }
    while( true ) {
      sVar6 = (int)param_3 - (int)param_2 >> 2;
      pwVar2 = wmemchr(param_2,L'\0',sVar6);
      pwVar4 = param_3;
      if (pwVar2 != (wchar_t *)0x0) {
        sVar6 = (int)pwVar2 - (int)param_2 >> 2;
        pwVar4 = pwVar2;
      }
      sVar6 = wcsnrtombs(pcVar3,param_4,sVar6,(int)param_6 - (int)pcVar3,param_1);
      if (sVar6 == 0xffffffff) break;
      param_2 = *param_4;
      pcVar3 = *param_7;
      if ((param_2 != (wchar_t *)0x0) && (param_2 < pwVar4)) {
        *param_7 = pcVar3 + sVar6;
        iVar5 = 1;
        goto joined_r0x0027afb1;
      }
      *param_4 = pwVar4;
      *param_7 = pcVar3 + sVar6;
      if (param_3 <= pwVar4) goto LAB_0027b0e0;
      local_34.__value = param_1->__value;
      local_34.__count = param_1->__count;
      sVar6 = wcrtomb(local_2c,*pwVar4,&local_34);
      if ((uint)((int)param_6 - (int)*param_7) < sVar6) {
        iVar5 = 1;
        goto LAB_0027b059;
      }
      memcpy(*param_7,local_2c,sVar6);
      param_1->__count = local_34.__count;
      param_1->__value = local_34.__value;
      pcVar3 = *param_7 + sVar6;
      *param_7 = pcVar3;
      param_2 = *param_4 + 1;
      *param_4 = param_2;
      if ((param_3 <= param_2) || (param_6 <= pcVar3)) {
        iVar5 = 0;
        goto LAB_0027b059;
      }
    }
    if (param_2 < *param_4) {
      pcVar3 = *param_7;
      do {
        pwVar4 = param_2 + 1;
        sVar6 = wcrtomb(pcVar3,*param_2,&local_34);
        pcVar3 = *param_7 + sVar6;
        *param_7 = pcVar3;
        param_2 = pwVar4;
      } while (pwVar4 < *param_4);
    }
    iVar5 = 2;
    param_1->__count = local_34.__count;
    param_1->__value = local_34.__value;
    param_2 = *param_4;
  } while( true );
LAB_0027b0e0:
  iVar5 = 0;
  param_2 = pwVar4;
  goto joined_r0x0027afb1;
}



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

int FUN_0027af60(int param_1,mbstate_t *param_2,wchar_t *param_3,wchar_t *param_4,wchar_t **param_5,
                uint param_6,char *param_7,uint *param_8)

{
  uint uVar1;
  undefined4 uVar2;
  wchar_t *pwVar3;
  char *pcVar4;
  wchar_t *pwVar5;
  int iVar6;
  size_t sVar7;
  mbstate_t local_34;
  char local_2c [24];
  undefined4 uStack_14;
  
  iVar6 = 0;
  uStack_14 = 0x27af6b;
  local_34.__value = param_2->__value;
  local_34.__count = param_2->__count;
  uVar2 = __uselocale(*(undefined4 *)(param_1 + 8));
  *param_5 = param_3;
  *param_8 = param_6;
joined_r0x0027afb1:
  do {
    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {
LAB_0027b059:
      __uselocale(uVar2);
      return iVar6;
    }
    while( true ) {
      sVar7 = (int)param_4 - (int)param_3 >> 2;
      pwVar3 = wmemchr(param_3,L'\0',sVar7);
      pwVar5 = param_4;
      if (pwVar3 != (wchar_t *)0x0) {
        sVar7 = (int)pwVar3 - (int)param_3 >> 2;
        pwVar5 = pwVar3;
      }
      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);
      if (sVar7 == 0xffffffff) break;
      param_3 = *param_5;
      uVar1 = *param_8;
      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {
        *param_8 = sVar7 + uVar1;
        iVar6 = 1;
        goto joined_r0x0027afb1;
      }
      *param_5 = pwVar5;
      *param_8 = sVar7 + uVar1;
      if (param_4 <= pwVar5) goto LAB_0027b0e0;
      local_34.__value = param_2->__value;
      local_34.__count = param_2->__count;
      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);
      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {
        iVar6 = 1;
        goto LAB_0027b059;
      }
      memcpy((void *)*param_8,local_2c,sVar7);
      param_2->__count = local_34.__count;
      param_2->__value = local_34.__value;
      pcVar4 = (char *)(*param_8 + sVar7);
      *param_8 = (uint)pcVar4;
      param_3 = *param_5 + 1;
      *param_5 = param_3;
      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {
        iVar6 = 0;
        goto LAB_0027b059;
      }
    }
    if (param_3 < *param_5) {
      pcVar4 = (char *)*param_8;
      do {
        pwVar5 = param_3 + 1;
        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);
        pcVar4 = (char *)(sVar7 + *param_8);
        *param_8 = (uint)pcVar4;
        param_3 = pwVar5;
      } while (pwVar5 < *param_5);
    }
    iVar6 = 2;
    param_2->__count = local_34.__count;
    param_2->__value = local_34.__value;
    param_3 = *param_5;
  } while( true );
LAB_0027b0e0:
  iVar6 = 0;
  param_3 = pwVar5;
  goto joined_r0x0027afb1;
}


PUSH EBP
PUSH EDI
XOR EDI,EDI
PUSH ESI
PUSH EBX
CALL 0x00035840
ADD EBX,0x114095
SUB ESP,0x48
MOV EAX,dword ptr [ESP + 0x60]
MOV ESI,dword ptr [ESP + 0x64]
MOV EBP,dword ptr [ESP + 0x78]
MOV EDX,dword ptr [EAX + 0x4]
MOV EAX,dword ptr [EAX]
MOV dword ptr [ESP + 0x24],EAX
MOV EAX,dword ptr [ESP + 0x5c]
MOV dword ptr [ESP + 0x28],EDX
PUSH dword ptr [EAX + 0x8]
CALL 0x000297d0
MOV dword ptr [ESP + 0x1c],EAX
MOV EAX,dword ptr [ESP + 0x70]
MOV dword ptr [EAX],ESI
MOV EAX,dword ptr [ESP + 0x74]
ADD ESP,0x10
MOV dword ptr [EBP],EAX
CMP dword ptr [ESP + 0x5c],ESI
JBE 0x0027b059
MOV ECX,dword ptr [EBP]
CMP ECX,dword ptr [ESP + 0x68]
JNC 0x0027b059
TEST EDI,EDI
JNZ 0x0027b059
LEA EAX,[ESP + 0x18]
MOV dword ptr [ESP + 0x6c],EBP
MOV EBP,ESI
MOV dword ptr [ESP + 0x8],EAX
MOV EDI,dword ptr [ESP + 0x5c]
MOV dword ptr [ESP + 0x4],ECX
SUB ESP,0x4
SUB EDI,EBP
SAR EDI,0x2
PUSH EDI
PUSH 0x0
PUSH EBP
CALL 0x000290d0
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x4]
TEST EAX,EAX
MOV ESI,EAX
JZ 0x0027b0d0
MOV EDI,EAX
SUB EDI,EBP
SAR EDI,0x2
SUB ESP,0xc
PUSH dword ptr [ESP + 0x60]
MOV EAX,dword ptr [ESP + 0x78]
SUB EAX,ECX
PUSH EAX
PUSH EDI
PUSH dword ptr [ESP + 0x78]
PUSH ECX
CALL 0x000298d0
ADD ESP,0x20
CMP EAX,-0x1
JZ 0x0027b0f0
MOV EDX,dword ptr [ESP + 0x60]
MOV EBP,dword ptr [EDX]
MOV EDX,dword ptr [ESP + 0x6c]
ADD EAX,dword ptr [EDX]
TEST EBP,EBP
JZ 0x0027b070
CMP EBP,ESI
JNC 0x0027b070
MOV ESI,EBP
MOV dword ptr [EDX],EAX
MOV EBP,EDX
MOV EDI,0x1
CMP dword ptr [ESP + 0x5c],ESI
JA 0x0027afb7
SUB ESP,0xc
PUSH dword ptr [ESP + 0x18]
CALL 0x000297d0
ADD ESP,0x4c
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDX,dword ptr [ESP + 0x60]
MOV ECX,dword ptr [ESP + 0x6c]
MOV dword ptr [EDX],ESI
MOV dword ptr [ECX],EAX
CMP ESI,dword ptr [ESP + 0x5c]
JNC 0x0027b0e0
MOV EAX,dword ptr [ESP + 0x54]
SUB ESP,0x4
MOV EDX,dword ptr [EAX + 0x4]
MOV EAX,dword ptr [EAX]
MOV dword ptr [ESP + 0x20],EDX
MOV dword ptr [ESP + 0x1c],EAX
PUSH dword ptr [ESP + 0xc]
PUSH dword ptr [ESI]
LEA EDI,[ESP + 0x2c]
PUSH EDI
CALL 0x000294d0
MOV EDX,dword ptr [ESP + 0x78]
MOV ESI,EAX
MOV EAX,dword ptr [ESP + 0x7c]
ADD ESP,0x10
MOV EAX,dword ptr [EAX]
SUB EDX,EAX
CMP EDX,ESI
JNC 0x0027b158
MOV EDI,0x1
JMP 0x0027b059
MOV ESI,dword ptr [ESP + 0x5c]
JMP 0x0027b00b
MOV EBP,dword ptr [ESP + 0x6c]
XOR EDI,EDI
JMP 0x0027afad
MOV EAX,dword ptr [ESP + 0x60]
MOV ESI,EBP
MOV EBP,dword ptr [ESP + 0x6c]
CMP dword ptr [EAX],ESI
JBE 0x0027b131
MOV dword ptr [ESP + 0x6c],EBP
MOV EAX,dword ptr [EBP]
MOV EBP,ESI
LEA EDI,[ESP + 0x18]
MOV ESI,dword ptr [ESP + 0x6c]
NOP
SUB ESP,0x4
ADD EBP,0x4
PUSH EDI
PUSH dword ptr [EBP + -0x4]
PUSH EAX
CALL 0x000294d0
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x60]
ADD EAX,dword ptr [ESI]
MOV dword ptr [ESI],EAX
CMP dword ptr [EDX],EBP
JA 0x0027b110
MOV EBP,ESI
MOV EAX,dword ptr [ESP + 0x18]
MOV ECX,dword ptr [ESP + 0x54]
MOV EDI,0x2
MOV EDX,dword ptr [ESP + 0x1c]
MOV dword ptr [ECX],EAX
MOV EAX,dword ptr [ESP + 0x60]
MOV dword ptr [ECX + 0x4],EDX
MOV ESI,dword ptr [EAX]
JMP 0x0027afad
SUB ESP,0x4
PUSH ESI
PUSH EDI
PUSH EAX
CALL 0x000295c0
MOV ECX,dword ptr [ESP + 0x64]
MOV EAX,dword ptr [ESP + 0x28]
MOV EDX,dword ptr [ESP + 0x2c]
MOV dword ptr [ECX],EAX
MOV EAX,dword ptr [ESP + 0x7c]
MOV dword ptr [ECX + 0x4],EDX
MOV ECX,dword ptr [EAX]
ADD ECX,ESI
MOV dword ptr [EAX],ECX
MOV EAX,dword ptr [ESP + 0x70]
MOV EAX,dword ptr [EAX]
MOV dword ptr [ESP + 0x14],EAX
LEA EBP,[EAX + 0x4]
MOV EAX,dword ptr [ESP + 0x70]
ADD ESP,0x10
MOV dword ptr [EAX],EBP
CMP EBP,dword ptr [ESP + 0x5c]
JNC 0x0027b1a4
CMP ECX,dword ptr [ESP + 0x68]
JC 0x0027afda
XOR EDI,EDI
JMP 0x0027b059
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_0027af60(int param_1,mbstate_t *param_2,wchar_t *param_3,wchar_t *param_4,wchar_t **param_5,\n                uint param_6,char *param_7,uint *param_8)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  wchar_t *pwVar3;\n  char *pcVar4;\n  wchar_t *pwVar5;\n  int iVar6;\n  size_t sVar7;\n  mbstate_t local_34;\n  char local_2c [24];\n  undefined4 uStack_14;\n  \n  iVar6 = 0;\n  uStack_14 = 0x27af6b;\n  local_34.__value = param_2->__value;\n  local_34.__count = param_2->__count;\n  uVar2 = __uselocale(*(undefined4 *)(param_1 + 8));\n  *param_5 = param_3;\n  *param_8 = param_6;\njoined_r0x0027afb1:\n  do {\n    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }\n    while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }\n    iVar6 = 2;\n    param_2->__count = local_34.__count;\n    param_2->__value = local_34.__value;\n    param_3 = *param_5;\n  } while( true );\nLAB_0027b0e0:\n  iVar6 = 0;\n  param_3 = pwVar5;\n  goto joined_r0x0027afb1;\n}\n\n" comment (function_definition "int FUN_0027af60(int param_1,mbstate_t *param_2,wchar_t *param_3,wchar_t *param_4,wchar_t **param_5,\n                uint param_6,char *param_7,uint *param_8)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  wchar_t *pwVar3;\n  char *pcVar4;\n  wchar_t *pwVar5;\n  int iVar6;\n  size_t sVar7;\n  mbstate_t local_34;\n  char local_2c [24];\n  undefined4 uStack_14;\n  \n  iVar6 = 0;\n  uStack_14 = 0x27af6b;\n  local_34.__value = param_2->__value;\n  local_34.__count = param_2->__count;\n  uVar2 = __uselocale(*(undefined4 *)(param_1 + 8));\n  *param_5 = param_3;\n  *param_8 = param_6;\njoined_r0x0027afb1:\n  do {\n    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }\n    while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }\n    iVar6 = 2;\n    param_2->__count = local_34.__count;\n    param_2->__value = local_34.__value;\n    param_3 = *param_5;\n  } while( true );\nLAB_0027b0e0:\n  iVar6 = 0;\n  param_3 = pwVar5;\n  goto joined_r0x0027afb1;\n}" primitive_type (function_declarator "FUN_0027af60(int param_1,mbstate_t *param_2,wchar_t *param_3,wchar_t *param_4,wchar_t **param_5,\n                uint param_6,char *param_7,uint *param_8)" identifier (parameter_list "(int param_1,mbstate_t *param_2,wchar_t *param_3,wchar_t *param_4,wchar_t **param_5,\n                uint param_6,char *param_7,uint *param_8)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "mbstate_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "wchar_t *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "wchar_t *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "wchar_t **param_5" type_identifier (pointer_declarator "**param_5" * (pointer_declarator "*param_5" * identifier))) , (parameter_declaration "uint param_6" type_identifier identifier) , (parameter_declaration "char *param_7" primitive_type (pointer_declarator "*param_7" * identifier)) , (parameter_declaration "uint *param_8" type_identifier (pointer_declarator "*param_8" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  undefined4 uVar2;\n  wchar_t *pwVar3;\n  char *pcVar4;\n  wchar_t *pwVar5;\n  int iVar6;\n  size_t sVar7;\n  mbstate_t local_34;\n  char local_2c [24];\n  undefined4 uStack_14;\n  \n  iVar6 = 0;\n  uStack_14 = 0x27af6b;\n  local_34.__value = param_2->__value;\n  local_34.__count = param_2->__count;\n  uVar2 = __uselocale(*(undefined4 *)(param_1 + 8));\n  *param_5 = param_3;\n  *param_8 = param_6;\njoined_r0x0027afb1:\n  do {\n    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }\n    while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }\n    iVar6 = 2;\n    param_2->__count = local_34.__count;\n    param_2->__value = local_34.__value;\n    param_3 = *param_5;\n  } while( true );\nLAB_0027b0e0:\n  iVar6 = 0;\n  param_3 = pwVar5;\n  goto joined_r0x0027afb1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "wchar_t *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "wchar_t *pwVar5;" type_identifier (pointer_declarator "*pwVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "size_t sVar7;" primitive_type identifier ;) (declaration "mbstate_t local_34;" type_identifier identifier ;) (declaration "char local_2c [24];" primitive_type (array_declarator "local_2c [24]" identifier [ number_literal ]) ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "uStack_14 = 0x27af6b;" (assignment_expression "uStack_14 = 0x27af6b" identifier = number_literal) ;) (expression_statement "local_34.__value = param_2->__value;" (assignment_expression "local_34.__value = param_2->__value" (field_expression "local_34.__value" identifier . field_identifier) = (field_expression "param_2->__value" identifier -> field_identifier)) ;) (expression_statement "local_34.__count = param_2->__count;" (assignment_expression "local_34.__count = param_2->__count" (field_expression "local_34.__count" identifier . field_identifier) = (field_expression "param_2->__count" identifier -> field_identifier)) ;) (expression_statement "uVar2 = __uselocale(*(undefined4 *)(param_1 + 8));" (assignment_expression "uVar2 = __uselocale(*(undefined4 *)(param_1 + 8))" identifier = (call_expression "__uselocale(*(undefined4 *)(param_1 + 8))" identifier (argument_list "(*(undefined4 *)(param_1 + 8))" ( (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) )))) ;) (expression_statement "*param_5 = param_3;" (assignment_expression "*param_5 = param_3" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = param_6;" (assignment_expression "*param_8 = param_6" (pointer_expression "*param_8" * identifier) = identifier) ;) (labeled_statement "joined_r0x0027afb1:\n  do {\n    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }\n    while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }\n    iVar6 = 2;\n    param_2->__count = local_34.__count;\n    param_2->__value = local_34.__value;\n    param_3 = *param_5;\n  } while( true );" statement_identifier : (do_statement "do {\n    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }\n    while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }\n    iVar6 = 2;\n    param_2->__count = local_34.__count;\n    param_2->__value = local_34.__value;\n    param_3 = *param_5;\n  } while( true );" do (compound_statement "{\n    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }\n    while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }\n    iVar6 = 2;\n    param_2->__count = local_34.__count;\n    param_2->__value = local_34.__value;\n    param_3 = *param_5;\n  }" { (if_statement "if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }" if (parenthesized_expression "(((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0))" ( (binary_expression "((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)" (parenthesized_expression "((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4))" ( (binary_expression "(param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)" (parenthesized_expression "(param_4 <= param_3)" ( (binary_expression "param_4 <= param_3" identifier <= identifier) )) || (parenthesized_expression "(pcVar4 = (char *)*param_8, param_7 <= pcVar4)" ( (comma_expression "pcVar4 = (char *)*param_8, param_7 <= pcVar4" (assignment_expression "pcVar4 = (char *)*param_8" identifier = (cast_expression "(char *)*param_8" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_8" * identifier))) , (binary_expression "param_7 <= pcVar4" identifier <= identifier)) ))) )) || (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) ))) )) (compound_statement "{\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }" { (labeled_statement "LAB_0027b059:\n      __uselocale(uVar2);" statement_identifier : (expression_statement "__uselocale(uVar2);" (call_expression "__uselocale(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;)) (return_statement "return iVar6;" return identifier ;) })) (while_statement "while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }" { (expression_statement "sVar7 = (int)param_4 - (int)param_3 >> 2;" (assignment_expression "sVar7 = (int)param_4 - (int)param_3 >> 2" identifier = (binary_expression "(int)param_4 - (int)param_3 >> 2" (binary_expression "(int)param_4 - (int)param_3" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ;) (expression_statement "pwVar3 = wmemchr(param_3,L'\0',sVar7);" (assignment_expression "pwVar3 = wmemchr(param_3,L'\0',sVar7)" identifier = (call_expression "wmemchr(param_3,L'\0',sVar7)" identifier (argument_list "(param_3,L'\0',sVar7)" ( identifier , (char_literal "L'\0'" L' escape_sequence ') , identifier )))) ;) (expression_statement "pwVar5 = param_4;" (assignment_expression "pwVar5 = param_4" identifier = identifier) ;) (if_statement "if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }" if (parenthesized_expression "(pwVar3 != (wchar_t *)0x0)" ( (binary_expression "pwVar3 != (wchar_t *)0x0" identifier != (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }" { (expression_statement "sVar7 = (int)pwVar3 - (int)param_3 >> 2;" (assignment_expression "sVar7 = (int)pwVar3 - (int)param_3 >> 2" identifier = (binary_expression "(int)pwVar3 - (int)param_3 >> 2" (binary_expression "(int)pwVar3 - (int)param_3" (cast_expression "(int)pwVar3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ;) (expression_statement "pwVar5 = pwVar3;" (assignment_expression "pwVar5 = pwVar3" identifier = identifier) ;) })) (expression_statement "sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);" (assignment_expression "sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2)" identifier = (call_expression "wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2)" identifier (argument_list "(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2)" ( identifier , identifier , identifier , (binary_expression "(int)param_7 - (int)pcVar4" (cast_expression "(int)param_7" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar4" ( (type_descriptor "int" primitive_type) ) identifier)) , identifier )))) ;) (if_statement "if (sVar7 == 0xffffffff) break;" if (parenthesized_expression "(sVar7 == 0xffffffff)" ( (binary_expression "sVar7 == 0xffffffff" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "param_3 = *param_5;" (assignment_expression "param_3 = *param_5" identifier = (pointer_expression "*param_5" * identifier)) ;) (expression_statement "uVar1 = *param_8;" (assignment_expression "uVar1 = *param_8" identifier = (pointer_expression "*param_8" * identifier)) ;) (if_statement "if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }" if (parenthesized_expression "((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5))" ( (binary_expression "(param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)" (parenthesized_expression "(param_3 != (wchar_t *)0x0)" ( (binary_expression "param_3 != (wchar_t *)0x0" identifier != (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(param_3 < pwVar5)" ( (binary_expression "param_3 < pwVar5" identifier < identifier) ))) )) (compound_statement "{\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }" { (expression_statement "*param_8 = sVar7 + uVar1;" (assignment_expression "*param_8 = sVar7 + uVar1" (pointer_expression "*param_8" * identifier) = (binary_expression "sVar7 + uVar1" identifier + identifier)) ;) (expression_statement "iVar6 = 1;" (assignment_expression "iVar6 = 1" identifier = number_literal) ;) (goto_statement "goto joined_r0x0027afb1;" goto statement_identifier ;) })) (expression_statement "*param_5 = pwVar5;" (assignment_expression "*param_5 = pwVar5" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = sVar7 + uVar1;" (assignment_expression "*param_8 = sVar7 + uVar1" (pointer_expression "*param_8" * identifier) = (binary_expression "sVar7 + uVar1" identifier + identifier)) ;) (if_statement "if (param_4 <= pwVar5) goto LAB_0027b0e0;" if (parenthesized_expression "(param_4 <= pwVar5)" ( (binary_expression "param_4 <= pwVar5" identifier <= identifier) )) (goto_statement "goto LAB_0027b0e0;" goto statement_identifier ;)) (expression_statement "local_34.__value = param_2->__value;" (assignment_expression "local_34.__value = param_2->__value" (field_expression "local_34.__value" identifier . field_identifier) = (field_expression "param_2->__value" identifier -> field_identifier)) ;) (expression_statement "local_34.__count = param_2->__count;" (assignment_expression "local_34.__count = param_2->__count" (field_expression "local_34.__count" identifier . field_identifier) = (field_expression "param_2->__count" identifier -> field_identifier)) ;) (expression_statement "sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);" (assignment_expression "sVar7 = wcrtomb(local_2c,*pwVar5,&local_34)" identifier = (call_expression "wcrtomb(local_2c,*pwVar5,&local_34)" identifier (argument_list "(local_2c,*pwVar5,&local_34)" ( identifier , (pointer_expression "*pwVar5" * identifier) , (pointer_expression "&local_34" & identifier) )))) ;) (if_statement "if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }" if (parenthesized_expression "((uint)((int)param_7 - (int)*param_8) < sVar7)" ( (binary_expression "(uint)((int)param_7 - (int)*param_8) < sVar7" (call_expression "(uint)((int)param_7 - (int)*param_8)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)param_7 - (int)*param_8)" ( (binary_expression "(int)param_7 - (int)*param_8" (cast_expression "(int)param_7" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)*param_8" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*param_8" * identifier))) ))) < identifier) )) (compound_statement "{\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }" { (expression_statement "iVar6 = 1;" (assignment_expression "iVar6 = 1" identifier = number_literal) ;) (goto_statement "goto LAB_0027b059;" goto statement_identifier ;) })) (expression_statement "memcpy((void *)*param_8,local_2c,sVar7);" (call_expression "memcpy((void *)*param_8,local_2c,sVar7)" identifier (argument_list "((void *)*param_8,local_2c,sVar7)" ( (cast_expression "(void *)*param_8" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_8" * identifier)) , identifier , identifier ))) ;) (expression_statement "param_2->__count = local_34.__count;" (assignment_expression "param_2->__count = local_34.__count" (field_expression "param_2->__count" identifier -> field_identifier) = (field_expression "local_34.__count" identifier . field_identifier)) ;) (expression_statement "param_2->__value = local_34.__value;" (assignment_expression "param_2->__value = local_34.__value" (field_expression "param_2->__value" identifier -> field_identifier) = (field_expression "local_34.__value" identifier . field_identifier)) ;) (expression_statement "pcVar4 = (char *)(*param_8 + sVar7);" (assignment_expression "pcVar4 = (char *)(*param_8 + sVar7)" identifier = (cast_expression "(char *)(*param_8 + sVar7)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_8 + sVar7)" ( (binary_expression "*param_8 + sVar7" (pointer_expression "*param_8" * identifier) + identifier) )))) ;) (expression_statement "*param_8 = (uint)pcVar4;" (assignment_expression "*param_8 = (uint)pcVar4" (pointer_expression "*param_8" * identifier) = (cast_expression "(uint)pcVar4" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "param_3 = *param_5 + 1;" (assignment_expression "param_3 = *param_5 + 1" identifier = (binary_expression "*param_5 + 1" (pointer_expression "*param_5" * identifier) + number_literal)) ;) (expression_statement "*param_5 = param_3;" (assignment_expression "*param_5 = param_3" (pointer_expression "*param_5" * identifier) = identifier) ;) (if_statement "if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }" if (parenthesized_expression "((param_4 <= param_3) || (param_7 <= pcVar4))" ( (binary_expression "(param_4 <= param_3) || (param_7 <= pcVar4)" (parenthesized_expression "(param_4 <= param_3)" ( (binary_expression "param_4 <= param_3" identifier <= identifier) )) || (parenthesized_expression "(param_7 <= pcVar4)" ( (binary_expression "param_7 <= pcVar4" identifier <= identifier) ))) )) (compound_statement "{\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }" { (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_0027b059;" goto statement_identifier ;) })) })) (if_statement "if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }" if (parenthesized_expression "(param_3 < *param_5)" ( (binary_expression "param_3 < *param_5" identifier < (pointer_expression "*param_5" * identifier)) )) (compound_statement "{\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }" { (expression_statement "pcVar4 = (char *)*param_8;" (assignment_expression "pcVar4 = (char *)*param_8" identifier = (cast_expression "(char *)*param_8" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_8" * identifier))) ;) (do_statement "do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);" do (compound_statement "{\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      }" { (expression_statement "pwVar5 = param_3 + 1;" (assignment_expression "pwVar5 = param_3 + 1" identifier = (binary_expression "param_3 + 1" identifier + number_literal)) ;) (expression_statement "sVar7 = wcrtomb(pcVar4,*param_3,&local_34);" (assignment_expression "sVar7 = wcrtomb(pcVar4,*param_3,&local_34)" identifier = (call_expression "wcrtomb(pcVar4,*param_3,&local_34)" identifier (argument_list "(pcVar4,*param_3,&local_34)" ( identifier , (pointer_expression "*param_3" * identifier) , (pointer_expression "&local_34" & identifier) )))) ;) (expression_statement "pcVar4 = (char *)(sVar7 + *param_8);" (assignment_expression "pcVar4 = (char *)(sVar7 + *param_8)" identifier = (cast_expression "(char *)(sVar7 + *param_8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(sVar7 + *param_8)" ( (binary_expression "sVar7 + *param_8" identifier + (pointer_expression "*param_8" * identifier)) )))) ;) (expression_statement "*param_8 = (uint)pcVar4;" (assignment_expression "*param_8 = (uint)pcVar4" (pointer_expression "*param_8" * identifier) = (cast_expression "(uint)pcVar4" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "param_3 = pwVar5;" (assignment_expression "param_3 = pwVar5" identifier = identifier) ;) }) while (parenthesized_expression "(pwVar5 < *param_5)" ( (binary_expression "pwVar5 < *param_5" identifier < (pointer_expression "*param_5" * identifier)) )) ;) })) (expression_statement "iVar6 = 2;" (assignment_expression "iVar6 = 2" identifier = number_literal) ;) (expression_statement "param_2->__count = local_34.__count;" (assignment_expression "param_2->__count = local_34.__count" (field_expression "param_2->__count" identifier -> field_identifier) = (field_expression "local_34.__count" identifier . field_identifier)) ;) (expression_statement "param_2->__value = local_34.__value;" (assignment_expression "param_2->__value = local_34.__value" (field_expression "param_2->__value" identifier -> field_identifier) = (field_expression "local_34.__value" identifier . field_identifier)) ;) (expression_statement "param_3 = *param_5;" (assignment_expression "param_3 = *param_5" identifier = (pointer_expression "*param_5" * identifier)) ;) }) while (parenthesized_expression "( true )" ( true )) ;)) (labeled_statement "LAB_0027b0e0:\n  iVar6 = 0;" statement_identifier : (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;)) (expression_statement "param_3 = pwVar5;" (assignment_expression "param_3 = pwVar5" identifier = identifier) ;) (goto_statement "goto joined_r0x0027afb1;" goto statement_identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::codecvt<wchar_t, char, __mbstate_t>::do_out(__mbstate_t&, wchar_t const*, wchar_t const*,\n   wchar_t const*&, char*, char*, char*&) const */\n\nint __thiscall\nstd::codecvt<wchar_t,char,__mbstate_t>::do_out\n          (codecvt<wchar_t,char,__mbstate_t> *this,__mbstate_t *param_1,wchar_t *param_2,\n          wchar_t *param_3,wchar_t **param_4,char *param_5,char *param_6,char **param_7)\n\n{\n  undefined4 uVar1;\n  wchar_t *pwVar2;\n  char *pcVar3;\n  wchar_t *pwVar4;\n  int iVar5;\n  size_t sVar6;\n  mbstate_t local_34;\n  char local_2c [24];\n  undefined4 uStack_14;\n  \n  iVar5 = 0;\n  uStack_14 = 0x27af6b;\n  local_34.__value = param_1->__value;\n  local_34.__count = param_1->__count;\n  uVar1 = __uselocale(*(undefined4 *)(this + 8));\n  *param_4 = param_2;\n  *param_7 = param_5;\njoined_r0x0027afb1:\n  do {\n    if (((param_3 <= param_2) || (pcVar3 = *param_7, param_6 <= pcVar3)) || (iVar5 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar1);\n      return iVar5;\n    }\n    while( true ) {\n      sVar6 = (int)param_3 - (int)param_2 >> 2;\n      pwVar2 = wmemchr(param_2,L'\0',sVar6);\n      pwVar4 = param_3;\n      if (pwVar2 != (wchar_t *)0x0) {\n        sVar6 = (int)pwVar2 - (int)param_2 >> 2;\n        pwVar4 = pwVar2;\n      }\n      sVar6 = wcsnrtombs(pcVar3,param_4,sVar6,(int)param_6 - (int)pcVar3,param_1);\n      if (sVar6 == 0xffffffff) break;\n      param_2 = *param_4;\n      pcVar3 = *param_7;\n      if ((param_2 != (wchar_t *)0x0) && (param_2 < pwVar4)) {\n        *param_7 = pcVar3 + sVar6;\n        iVar5 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_4 = pwVar4;\n      *param_7 = pcVar3 + sVar6;\n      if (param_3 <= pwVar4) goto LAB_0027b0e0;\n      local_34.__value = param_1->__value;\n      local_34.__count = param_1->__count;\n      sVar6 = wcrtomb(local_2c,*pwVar4,&local_34);\n      if ((uint)((int)param_6 - (int)*param_7) < sVar6) {\n        iVar5 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy(*param_7,local_2c,sVar6);\n      param_1->__count = local_34.__count;\n      param_1->__value = local_34.__value;\n      pcVar3 = *param_7 + sVar6;\n      *param_7 = pcVar3;\n      param_2 = *param_4 + 1;\n      *param_4 = param_2;\n      if ((param_3 <= param_2) || (param_6 <= pcVar3)) {\n        iVar5 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_2 < *param_4) {\n      pcVar3 = *param_7;\n      do {\n        pwVar4 = param_2 + 1;\n        sVar6 = wcrtomb(pcVar3,*param_2,&local_34);\n        pcVar3 = *param_7 + sVar6;\n        *param_7 = pcVar3;\n        param_2 = pwVar4;\n      } while (pwVar4 < *param_4);\n    }\n    iVar5 = 2;\n    param_1->__count = local_34.__count;\n    param_1->__value = local_34.__value;\n    param_2 = *param_4;\n  } while( true );\nLAB_0027b0e0:\n  iVar5 = 0;\n  param_2 = pwVar4;\n  goto joined_r0x0027afb1;\n}\n\n" comment comment (declaration "int __thiscall\nstd::codecvt<wchar_t,char,__mbstate_t>::do_out\n          (codecvt<wchar_t,char,__mbstate_t> *this,__mbstate_t *param_1,wchar_t *param_2,\n          wchar_t *param_3,wchar_t **param_4,char *param_5,char *param_6,char **param_7)\n\n{\n  undefined4 uVar1;" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::codecvt<" identifier : : identifier <) identifier , identifier , (ERROR "__mbstate_t>::do_out\n          (codecvt<wchar_t,char,__mbstate_t> *this,__mbstate_t *param_1,wchar_t *param_2,\n          wchar_t *param_3,wchar_t **param_4,char *param_5,char *param_6,char **param_7)\n\n{\n  undefined4" (function_declarator "__mbstate_t>::do_out\n          (codecvt<wchar_t,char,__mbstate_t> *this,__mbstate_t *param_1,wchar_t *param_2,\n          wchar_t *param_3,wchar_t **param_4,char *param_5,char *param_6,char **param_7)" identifier (ERROR ">::do_out" > : : identifier) (parameter_list "(codecvt<wchar_t,char,__mbstate_t> *this,__mbstate_t *param_1,wchar_t *param_2,\n          wchar_t *param_3,wchar_t **param_4,char *param_5,char *param_6,char **param_7)" ( (parameter_declaration "codecvt<wchar_t" type_identifier (ERROR "<" <) identifier) , (parameter_declaration "char" primitive_type) , (parameter_declaration "__mbstate_t> *this" type_identifier (ERROR ">" >) (pointer_declarator "*this" * identifier)) , (parameter_declaration "__mbstate_t *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "wchar_t *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "wchar_t **param_4" type_identifier (pointer_declarator "**param_4" * (pointer_declarator "*param_4" * identifier))) , (parameter_declaration "char *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "char *param_6" primitive_type (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "char **param_7" primitive_type (pointer_declarator "**param_7" * (pointer_declarator "*param_7" * identifier))) ))) { identifier) identifier ;) (declaration "wchar_t *pwVar2;" type_identifier (pointer_declarator "*pwVar2" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "wchar_t *pwVar4;" type_identifier (pointer_declarator "*pwVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "mbstate_t local_34;" type_identifier identifier ;) (declaration "char local_2c [24];" primitive_type (array_declarator "local_2c [24]" identifier [ number_literal ]) ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "uStack_14 = 0x27af6b;" (assignment_expression "uStack_14 = 0x27af6b" identifier = number_literal) ;) (expression_statement "local_34.__value = param_1->__value;" (assignment_expression "local_34.__value = param_1->__value" (field_expression "local_34.__value" identifier . field_identifier) = (field_expression "param_1->__value" identifier -> field_identifier)) ;) (expression_statement "local_34.__count = param_1->__count;" (assignment_expression "local_34.__count = param_1->__count" (field_expression "local_34.__count" identifier . field_identifier) = (field_expression "param_1->__count" identifier -> field_identifier)) ;) (expression_statement "uVar1 = __uselocale(*(undefined4 *)(this + 8));" (assignment_expression "uVar1 = __uselocale(*(undefined4 *)(this + 8))" identifier = (call_expression "__uselocale(*(undefined4 *)(this + 8))" identifier (argument_list "(*(undefined4 *)(this + 8))" ( (pointer_expression "*(undefined4 *)(this + 8)" * (cast_expression "(undefined4 *)(this + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) )))) ;) (expression_statement "*param_4 = param_2;" (assignment_expression "*param_4 = param_2" (pointer_expression "*param_4" * identifier) = identifier) ;) (expression_statement "*param_7 = param_5;" (assignment_expression "*param_7 = param_5" (pointer_expression "*param_7" * identifier) = identifier) ;) (labeled_statement "joined_r0x0027afb1:\n  do {\n    if (((param_3 <= param_2) || (pcVar3 = *param_7, param_6 <= pcVar3)) || (iVar5 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar1);\n      return iVar5;\n    }\n    while( true ) {\n      sVar6 = (int)param_3 - (int)param_2 >> 2;\n      pwVar2 = wmemchr(param_2,L'\0',sVar6);\n      pwVar4 = param_3;\n      if (pwVar2 != (wchar_t *)0x0) {\n        sVar6 = (int)pwVar2 - (int)param_2 >> 2;\n        pwVar4 = pwVar2;\n      }\n      sVar6 = wcsnrtombs(pcVar3,param_4,sVar6,(int)param_6 - (int)pcVar3,param_1);\n      if (sVar6 == 0xffffffff) break;\n      param_2 = *param_4;\n      pcVar3 = *param_7;\n      if ((param_2 != (wchar_t *)0x0) && (param_2 < pwVar4)) {\n        *param_7 = pcVar3 + sVar6;\n        iVar5 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_4 = pwVar4;\n      *param_7 = pcVar3 + sVar6;\n      if (param_3 <= pwVar4) goto LAB_0027b0e0;\n      local_34.__value = param_1->__value;\n      local_34.__count = param_1->__count;\n      sVar6 = wcrtomb(local_2c,*pwVar4,&local_34);\n      if ((uint)((int)param_6 - (int)*param_7) < sVar6) {\n        iVar5 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy(*param_7,local_2c,sVar6);\n      param_1->__count = local_34.__count;\n      param_1->__value = local_34.__value;\n      pcVar3 = *param_7 + sVar6;\n      *param_7 = pcVar3;\n      param_2 = *param_4 + 1;\n      *param_4 = param_2;\n      if ((param_3 <= param_2) || (param_6 <= pcVar3)) {\n        iVar5 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_2 < *param_4) {\n      pcVar3 = *param_7;\n      do {\n        pwVar4 = param_2 + 1;\n        sVar6 = wcrtomb(pcVar3,*param_2,&local_34);\n        pcVar3 = *param_7 + sVar6;\n        *param_7 = pcVar3;\n        param_2 = pwVar4;\n      } while (pwVar4 < *param_4);\n    }\n    iVar5 = 2;\n    param_1->__count = local_34.__count;\n    param_1->__value = local_34.__value;\n    param_2 = *param_4;\n  } while( true );" statement_identifier : (do_statement "do {\n    if (((param_3 <= param_2) || (pcVar3 = *param_7, param_6 <= pcVar3)) || (iVar5 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar1);\n      return iVar5;\n    }\n    while( true ) {\n      sVar6 = (int)param_3 - (int)param_2 >> 2;\n      pwVar2 = wmemchr(param_2,L'\0',sVar6);\n      pwVar4 = param_3;\n      if (pwVar2 != (wchar_t *)0x0) {\n        sVar6 = (int)pwVar2 - (int)param_2 >> 2;\n        pwVar4 = pwVar2;\n      }\n      sVar6 = wcsnrtombs(pcVar3,param_4,sVar6,(int)param_6 - (int)pcVar3,param_1);\n      if (sVar6 == 0xffffffff) break;\n      param_2 = *param_4;\n      pcVar3 = *param_7;\n      if ((param_2 != (wchar_t *)0x0) && (param_2 < pwVar4)) {\n        *param_7 = pcVar3 + sVar6;\n        iVar5 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_4 = pwVar4;\n      *param_7 = pcVar3 + sVar6;\n      if (param_3 <= pwVar4) goto LAB_0027b0e0;\n      local_34.__value = param_1->__value;\n      local_34.__count = param_1->__count;\n      sVar6 = wcrtomb(local_2c,*pwVar4,&local_34);\n      if ((uint)((int)param_6 - (int)*param_7) < sVar6) {\n        iVar5 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy(*param_7,local_2c,sVar6);\n      param_1->__count = local_34.__count;\n      param_1->__value = local_34.__value;\n      pcVar3 = *param_7 + sVar6;\n      *param_7 = pcVar3;\n      param_2 = *param_4 + 1;\n      *param_4 = param_2;\n      if ((param_3 <= param_2) || (param_6 <= pcVar3)) {\n        iVar5 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_2 < *param_4) {\n      pcVar3 = *param_7;\n      do {\n        pwVar4 = param_2 + 1;\n        sVar6 = wcrtomb(pcVar3,*param_2,&local_34);\n        pcVar3 = *param_7 + sVar6;\n        *param_7 = pcVar3;\n        param_2 = pwVar4;\n      } while (pwVar4 < *param_4);\n    }\n    iVar5 = 2;\n    param_1->__count = local_34.__count;\n    param_1->__value = local_34.__value;\n    param_2 = *param_4;\n  } while( true );" do (compound_statement "{\n    if (((param_3 <= param_2) || (pcVar3 = *param_7, param_6 <= pcVar3)) || (iVar5 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar1);\n      return iVar5;\n    }\n    while( true ) {\n      sVar6 = (int)param_3 - (int)param_2 >> 2;\n      pwVar2 = wmemchr(param_2,L'\0',sVar6);\n      pwVar4 = param_3;\n      if (pwVar2 != (wchar_t *)0x0) {\n        sVar6 = (int)pwVar2 - (int)param_2 >> 2;\n        pwVar4 = pwVar2;\n      }\n      sVar6 = wcsnrtombs(pcVar3,param_4,sVar6,(int)param_6 - (int)pcVar3,param_1);\n      if (sVar6 == 0xffffffff) break;\n      param_2 = *param_4;\n      pcVar3 = *param_7;\n      if ((param_2 != (wchar_t *)0x0) && (param_2 < pwVar4)) {\n        *param_7 = pcVar3 + sVar6;\n        iVar5 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_4 = pwVar4;\n      *param_7 = pcVar3 + sVar6;\n      if (param_3 <= pwVar4) goto LAB_0027b0e0;\n      local_34.__value = param_1->__value;\n      local_34.__count = param_1->__count;\n      sVar6 = wcrtomb(local_2c,*pwVar4,&local_34);\n      if ((uint)((int)param_6 - (int)*param_7) < sVar6) {\n        iVar5 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy(*param_7,local_2c,sVar6);\n      param_1->__count = local_34.__count;\n      param_1->__value = local_34.__value;\n      pcVar3 = *param_7 + sVar6;\n      *param_7 = pcVar3;\n      param_2 = *param_4 + 1;\n      *param_4 = param_2;\n      if ((param_3 <= param_2) || (param_6 <= pcVar3)) {\n        iVar5 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_2 < *param_4) {\n      pcVar3 = *param_7;\n      do {\n        pwVar4 = param_2 + 1;\n        sVar6 = wcrtomb(pcVar3,*param_2,&local_34);\n        pcVar3 = *param_7 + sVar6;\n        *param_7 = pcVar3;\n        param_2 = pwVar4;\n      } while (pwVar4 < *param_4);\n    }\n    iVar5 = 2;\n    param_1->__count = local_34.__count;\n    param_1->__value = local_34.__value;\n    param_2 = *param_4;\n  }" { (if_statement "if (((param_3 <= param_2) || (pcVar3 = *param_7, param_6 <= pcVar3)) || (iVar5 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar1);\n      return iVar5;\n    }" if (parenthesized_expression "(((param_3 <= param_2) || (pcVar3 = *param_7, param_6 <= pcVar3)) || (iVar5 != 0))" ( (binary_expression "((param_3 <= param_2) || (pcVar3 = *param_7, param_6 <= pcVar3)) || (iVar5 != 0)" (parenthesized_expression "((param_3 <= param_2) || (pcVar3 = *param_7, param_6 <= pcVar3))" ( (binary_expression "(param_3 <= param_2) || (pcVar3 = *param_7, param_6 <= pcVar3)" (parenthesized_expression "(param_3 <= param_2)" ( (binary_expression "param_3 <= param_2" identifier <= identifier) )) || (parenthesized_expression "(pcVar3 = *param_7, param_6 <= pcVar3)" ( (comma_expression "pcVar3 = *param_7, param_6 <= pcVar3" (assignment_expression "pcVar3 = *param_7" identifier = (pointer_expression "*param_7" * identifier)) , (binary_expression "param_6 <= pcVar3" identifier <= identifier)) ))) )) || (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) ))) )) (compound_statement "{\nLAB_0027b059:\n      __uselocale(uVar1);\n      return iVar5;\n    }" { (labeled_statement "LAB_0027b059:\n      __uselocale(uVar1);" statement_identifier : (expression_statement "__uselocale(uVar1);" (call_expression "__uselocale(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;)) (return_statement "return iVar5;" return identifier ;) })) (while_statement "while( true ) {\n      sVar6 = (int)param_3 - (int)param_2 >> 2;\n      pwVar2 = wmemchr(param_2,L'\0',sVar6);\n      pwVar4 = param_3;\n      if (pwVar2 != (wchar_t *)0x0) {\n        sVar6 = (int)pwVar2 - (int)param_2 >> 2;\n        pwVar4 = pwVar2;\n      }\n      sVar6 = wcsnrtombs(pcVar3,param_4,sVar6,(int)param_6 - (int)pcVar3,param_1);\n      if (sVar6 == 0xffffffff) break;\n      param_2 = *param_4;\n      pcVar3 = *param_7;\n      if ((param_2 != (wchar_t *)0x0) && (param_2 < pwVar4)) {\n        *param_7 = pcVar3 + sVar6;\n        iVar5 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_4 = pwVar4;\n      *param_7 = pcVar3 + sVar6;\n      if (param_3 <= pwVar4) goto LAB_0027b0e0;\n      local_34.__value = param_1->__value;\n      local_34.__count = param_1->__count;\n      sVar6 = wcrtomb(local_2c,*pwVar4,&local_34);\n      if ((uint)((int)param_6 - (int)*param_7) < sVar6) {\n        iVar5 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy(*param_7,local_2c,sVar6);\n      param_1->__count = local_34.__count;\n      param_1->__value = local_34.__value;\n      pcVar3 = *param_7 + sVar6;\n      *param_7 = pcVar3;\n      param_2 = *param_4 + 1;\n      *param_4 = param_2;\n      if ((param_3 <= param_2) || (param_6 <= pcVar3)) {\n        iVar5 = 0;\n        goto LAB_0027b059;\n      }\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      sVar6 = (int)param_3 - (int)param_2 >> 2;\n      pwVar2 = wmemchr(param_2,L'\0',sVar6);\n      pwVar4 = param_3;\n      if (pwVar2 != (wchar_t *)0x0) {\n        sVar6 = (int)pwVar2 - (int)param_2 >> 2;\n        pwVar4 = pwVar2;\n      }\n      sVar6 = wcsnrtombs(pcVar3,param_4,sVar6,(int)param_6 - (int)pcVar3,param_1);\n      if (sVar6 == 0xffffffff) break;\n      param_2 = *param_4;\n      pcVar3 = *param_7;\n      if ((param_2 != (wchar_t *)0x0) && (param_2 < pwVar4)) {\n        *param_7 = pcVar3 + sVar6;\n        iVar5 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_4 = pwVar4;\n      *param_7 = pcVar3 + sVar6;\n      if (param_3 <= pwVar4) goto LAB_0027b0e0;\n      local_34.__value = param_1->__value;\n      local_34.__count = param_1->__count;\n      sVar6 = wcrtomb(local_2c,*pwVar4,&local_34);\n      if ((uint)((int)param_6 - (int)*param_7) < sVar6) {\n        iVar5 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy(*param_7,local_2c,sVar6);\n      param_1->__count = local_34.__count;\n      param_1->__value = local_34.__value;\n      pcVar3 = *param_7 + sVar6;\n      *param_7 = pcVar3;\n      param_2 = *param_4 + 1;\n      *param_4 = param_2;\n      if ((param_3 <= param_2) || (param_6 <= pcVar3)) {\n        iVar5 = 0;\n        goto LAB_0027b059;\n      }\n    }" { (expression_statement "sVar6 = (int)param_3 - (int)param_2 >> 2;" (assignment_expression "sVar6 = (int)param_3 - (int)param_2 >> 2" identifier = (binary_expression "(int)param_3 - (int)param_2 >> 2" (binary_expression "(int)param_3 - (int)param_2" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ;) (expression_statement "pwVar2 = wmemchr(param_2,L'\0',sVar6);" (assignment_expression "pwVar2 = wmemchr(param_2,L'\0',sVar6)" identifier = (call_expression "wmemchr(param_2,L'\0',sVar6)" identifier (argument_list "(param_2,L'\0',sVar6)" ( identifier , (char_literal "L'\0'" L' escape_sequence ') , identifier )))) ;) (expression_statement "pwVar4 = param_3;" (assignment_expression "pwVar4 = param_3" identifier = identifier) ;) (if_statement "if (pwVar2 != (wchar_t *)0x0) {\n        sVar6 = (int)pwVar2 - (int)param_2 >> 2;\n        pwVar4 = pwVar2;\n      }" if (parenthesized_expression "(pwVar2 != (wchar_t *)0x0)" ( (binary_expression "pwVar2 != (wchar_t *)0x0" identifier != (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        sVar6 = (int)pwVar2 - (int)param_2 >> 2;\n        pwVar4 = pwVar2;\n      }" { (expression_statement "sVar6 = (int)pwVar2 - (int)param_2 >> 2;" (assignment_expression "sVar6 = (int)pwVar2 - (int)param_2 >> 2" identifier = (binary_expression "(int)pwVar2 - (int)param_2 >> 2" (binary_expression "(int)pwVar2 - (int)param_2" (cast_expression "(int)pwVar2" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ;) (expression_statement "pwVar4 = pwVar2;" (assignment_expression "pwVar4 = pwVar2" identifier = identifier) ;) })) (expression_statement "sVar6 = wcsnrtombs(pcVar3,param_4,sVar6,(int)param_6 - (int)pcVar3,param_1);" (assignment_expression "sVar6 = wcsnrtombs(pcVar3,param_4,sVar6,(int)param_6 - (int)pcVar3,param_1)" identifier = (call_expression "wcsnrtombs(pcVar3,param_4,sVar6,(int)param_6 - (int)pcVar3,param_1)" identifier (argument_list "(pcVar3,param_4,sVar6,(int)param_6 - (int)pcVar3,param_1)" ( identifier , identifier , identifier , (binary_expression "(int)param_6 - (int)pcVar3" (cast_expression "(int)param_6" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar3" ( (type_descriptor "int" primitive_type) ) identifier)) , identifier )))) ;) (if_statement "if (sVar6 == 0xffffffff) break;" if (parenthesized_expression "(sVar6 == 0xffffffff)" ( (binary_expression "sVar6 == 0xffffffff" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "param_2 = *param_4;" (assignment_expression "param_2 = *param_4" identifier = (pointer_expression "*param_4" * identifier)) ;) (expression_statement "pcVar3 = *param_7;" (assignment_expression "pcVar3 = *param_7" identifier = (pointer_expression "*param_7" * identifier)) ;) (if_statement "if ((param_2 != (wchar_t *)0x0) && (param_2 < pwVar4)) {\n        *param_7 = pcVar3 + sVar6;\n        iVar5 = 1;\n        goto joined_r0x0027afb1;\n      }" if (parenthesized_expression "((param_2 != (wchar_t *)0x0) && (param_2 < pwVar4))" ( (binary_expression "(param_2 != (wchar_t *)0x0) && (param_2 < pwVar4)" (parenthesized_expression "(param_2 != (wchar_t *)0x0)" ( (binary_expression "param_2 != (wchar_t *)0x0" identifier != (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(param_2 < pwVar4)" ( (binary_expression "param_2 < pwVar4" identifier < identifier) ))) )) (compound_statement "{\n        *param_7 = pcVar3 + sVar6;\n        iVar5 = 1;\n        goto joined_r0x0027afb1;\n      }" { (expression_statement "*param_7 = pcVar3 + sVar6;" (assignment_expression "*param_7 = pcVar3 + sVar6" (pointer_expression "*param_7" * identifier) = (binary_expression "pcVar3 + sVar6" identifier + identifier)) ;) (expression_statement "iVar5 = 1;" (assignment_expression "iVar5 = 1" identifier = number_literal) ;) (goto_statement "goto joined_r0x0027afb1;" goto statement_identifier ;) })) (expression_statement "*param_4 = pwVar4;" (assignment_expression "*param_4 = pwVar4" (pointer_expression "*param_4" * identifier) = identifier) ;) (expression_statement "*param_7 = pcVar3 + sVar6;" (assignment_expression "*param_7 = pcVar3 + sVar6" (pointer_expression "*param_7" * identifier) = (binary_expression "pcVar3 + sVar6" identifier + identifier)) ;) (if_statement "if (param_3 <= pwVar4) goto LAB_0027b0e0;" if (parenthesized_expression "(param_3 <= pwVar4)" ( (binary_expression "param_3 <= pwVar4" identifier <= identifier) )) (goto_statement "goto LAB_0027b0e0;" goto statement_identifier ;)) (expression_statement "local_34.__value = param_1->__value;" (assignment_expression "local_34.__value = param_1->__value" (field_expression "local_34.__value" identifier . field_identifier) = (field_expression "param_1->__value" identifier -> field_identifier)) ;) (expression_statement "local_34.__count = param_1->__count;" (assignment_expression "local_34.__count = param_1->__count" (field_expression "local_34.__count" identifier . field_identifier) = (field_expression "param_1->__count" identifier -> field_identifier)) ;) (expression_statement "sVar6 = wcrtomb(local_2c,*pwVar4,&local_34);" (assignment_expression "sVar6 = wcrtomb(local_2c,*pwVar4,&local_34)" identifier = (call_expression "wcrtomb(local_2c,*pwVar4,&local_34)" identifier (argument_list "(local_2c,*pwVar4,&local_34)" ( identifier , (pointer_expression "*pwVar4" * identifier) , (pointer_expression "&local_34" & identifier) )))) ;) (if_statement "if ((uint)((int)param_6 - (int)*param_7) < sVar6) {\n        iVar5 = 1;\n        goto LAB_0027b059;\n      }" if (parenthesized_expression "((uint)((int)param_6 - (int)*param_7) < sVar6)" ( (binary_expression "(uint)((int)param_6 - (int)*param_7) < sVar6" (call_expression "(uint)((int)param_6 - (int)*param_7)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)param_6 - (int)*param_7)" ( (binary_expression "(int)param_6 - (int)*param_7" (cast_expression "(int)param_6" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)*param_7" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*param_7" * identifier))) ))) < identifier) )) (compound_statement "{\n        iVar5 = 1;\n        goto LAB_0027b059;\n      }" { (expression_statement "iVar5 = 1;" (assignment_expression "iVar5 = 1" identifier = number_literal) ;) (goto_statement "goto LAB_0027b059;" goto statement_identifier ;) })) (expression_statement "memcpy(*param_7,local_2c,sVar6);" (call_expression "memcpy(*param_7,local_2c,sVar6)" identifier (argument_list "(*param_7,local_2c,sVar6)" ( (pointer_expression "*param_7" * identifier) , identifier , identifier ))) ;) (expression_statement "param_1->__count = local_34.__count;" (assignment_expression "param_1->__count = local_34.__count" (field_expression "param_1->__count" identifier -> field_identifier) = (field_expression "local_34.__count" identifier . field_identifier)) ;) (expression_statement "param_1->__value = local_34.__value;" (assignment_expression "param_1->__value = local_34.__value" (field_expression "param_1->__value" identifier -> field_identifier) = (field_expression "local_34.__value" identifier . field_identifier)) ;) (expression_statement "pcVar3 = *param_7 + sVar6;" (assignment_expression "pcVar3 = *param_7 + sVar6" identifier = (binary_expression "*param_7 + sVar6" (pointer_expression "*param_7" * identifier) + identifier)) ;) (expression_statement "*param_7 = pcVar3;" (assignment_expression "*param_7 = pcVar3" (pointer_expression "*param_7" * identifier) = identifier) ;) (expression_statement "param_2 = *param_4 + 1;" (assignment_expression "param_2 = *param_4 + 1" identifier = (binary_expression "*param_4 + 1" (pointer_expression "*param_4" * identifier) + number_literal)) ;) (expression_statement "*param_4 = param_2;" (assignment_expression "*param_4 = param_2" (pointer_expression "*param_4" * identifier) = identifier) ;) (if_statement "if ((param_3 <= param_2) || (param_6 <= pcVar3)) {\n        iVar5 = 0;\n        goto LAB_0027b059;\n      }" if (parenthesized_expression "((param_3 <= param_2) || (param_6 <= pcVar3))" ( (binary_expression "(param_3 <= param_2) || (param_6 <= pcVar3)" (parenthesized_expression "(param_3 <= param_2)" ( (binary_expression "param_3 <= param_2" identifier <= identifier) )) || (parenthesized_expression "(param_6 <= pcVar3)" ( (binary_expression "param_6 <= pcVar3" identifier <= identifier) ))) )) (compound_statement "{\n        iVar5 = 0;\n        goto LAB_0027b059;\n      }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_0027b059;" goto statement_identifier ;) })) })) (if_statement "if (param_2 < *param_4) {\n      pcVar3 = *param_7;\n      do {\n        pwVar4 = param_2 + 1;\n        sVar6 = wcrtomb(pcVar3,*param_2,&local_34);\n        pcVar3 = *param_7 + sVar6;\n        *param_7 = pcVar3;\n        param_2 = pwVar4;\n      } while (pwVar4 < *param_4);\n    }" if (parenthesized_expression "(param_2 < *param_4)" ( (binary_expression "param_2 < *param_4" identifier < (pointer_expression "*param_4" * identifier)) )) (compound_statement "{\n      pcVar3 = *param_7;\n      do {\n        pwVar4 = param_2 + 1;\n        sVar6 = wcrtomb(pcVar3,*param_2,&local_34);\n        pcVar3 = *param_7 + sVar6;\n        *param_7 = pcVar3;\n        param_2 = pwVar4;\n      } while (pwVar4 < *param_4);\n    }" { (expression_statement "pcVar3 = *param_7;" (assignment_expression "pcVar3 = *param_7" identifier = (pointer_expression "*param_7" * identifier)) ;) (do_statement "do {\n        pwVar4 = param_2 + 1;\n        sVar6 = wcrtomb(pcVar3,*param_2,&local_34);\n        pcVar3 = *param_7 + sVar6;\n        *param_7 = pcVar3;\n        param_2 = pwVar4;\n      } while (pwVar4 < *param_4);" do (compound_statement "{\n        pwVar4 = param_2 + 1;\n        sVar6 = wcrtomb(pcVar3,*param_2,&local_34);\n        pcVar3 = *param_7 + sVar6;\n        *param_7 = pcVar3;\n        param_2 = pwVar4;\n      }" { (expression_statement "pwVar4 = param_2 + 1;" (assignment_expression "pwVar4 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) (expression_statement "sVar6 = wcrtomb(pcVar3,*param_2,&local_34);" (assignment_expression "sVar6 = wcrtomb(pcVar3,*param_2,&local_34)" identifier = (call_expression "wcrtomb(pcVar3,*param_2,&local_34)" identifier (argument_list "(pcVar3,*param_2,&local_34)" ( identifier , (pointer_expression "*param_2" * identifier) , (pointer_expression "&local_34" & identifier) )))) ;) (expression_statement "pcVar3 = *param_7 + sVar6;" (assignment_expression "pcVar3 = *param_7 + sVar6" identifier = (binary_expression "*param_7 + sVar6" (pointer_expression "*param_7" * identifier) + identifier)) ;) (expression_statement "*param_7 = pcVar3;" (assignment_expression "*param_7 = pcVar3" (pointer_expression "*param_7" * identifier) = identifier) ;) (expression_statement "param_2 = pwVar4;" (assignment_expression "param_2 = pwVar4" identifier = identifier) ;) }) while (parenthesized_expression "(pwVar4 < *param_4)" ( (binary_expression "pwVar4 < *param_4" identifier < (pointer_expression "*param_4" * identifier)) )) ;) })) (expression_statement "iVar5 = 2;" (assignment_expression "iVar5 = 2" identifier = number_literal) ;) (expression_statement "param_1->__count = local_34.__count;" (assignment_expression "param_1->__count = local_34.__count" (field_expression "param_1->__count" identifier -> field_identifier) = (field_expression "local_34.__count" identifier . field_identifier)) ;) (expression_statement "param_1->__value = local_34.__value;" (assignment_expression "param_1->__value = local_34.__value" (field_expression "param_1->__value" identifier -> field_identifier) = (field_expression "local_34.__value" identifier . field_identifier)) ;) (expression_statement "param_2 = *param_4;" (assignment_expression "param_2 = *param_4" identifier = (pointer_expression "*param_4" * identifier)) ;) }) while (parenthesized_expression "( true )" ( true )) ;)) (labeled_statement "LAB_0027b0e0:\n  iVar5 = 0;" statement_identifier : (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;)) (expression_statement "param_2 = pwVar4;" (assignment_expression "param_2 = pwVar4" identifier = identifier) ;) (goto_statement "goto joined_r0x0027afb1;" goto statement_identifier ;) (ERROR "}" }))
(translation_unit "int FUN_0027af60(int param_1,mbstate_t *param_2,wchar_t *param_3,wchar_t *param_4,wchar_t **param_5,\n                uint param_6,char *param_7,uint *param_8)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  wchar_t *pwVar3;\n  char *pcVar4;\n  wchar_t *pwVar5;\n  int iVar6;\n  size_t sVar7;\n  mbstate_t local_34;\n  char local_2c [24];\n  undefined4 uStack_14;\n  \n  iVar6 = 0;\n  uStack_14 = 0x27af6b;\n  local_34.__value = param_2->__value;\n  local_34.__count = param_2->__count;\n  uVar2 = __uselocale(*(undefined4 *)(param_1 + 8));\n  *param_5 = param_3;\n  *param_8 = param_6;\njoined_r0x0027afb1:\n  do {\n    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }\n    while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }\n    iVar6 = 2;\n    param_2->__count = local_34.__count;\n    param_2->__value = local_34.__value;\n    param_3 = *param_5;\n  } while( true );\nLAB_0027b0e0:\n  iVar6 = 0;\n  param_3 = pwVar5;\n  goto joined_r0x0027afb1;\n}\n\n" (function_definition "int FUN_0027af60(int param_1,mbstate_t *param_2,wchar_t *param_3,wchar_t *param_4,wchar_t **param_5,\n                uint param_6,char *param_7,uint *param_8)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  wchar_t *pwVar3;\n  char *pcVar4;\n  wchar_t *pwVar5;\n  int iVar6;\n  size_t sVar7;\n  mbstate_t local_34;\n  char local_2c [24];\n  undefined4 uStack_14;\n  \n  iVar6 = 0;\n  uStack_14 = 0x27af6b;\n  local_34.__value = param_2->__value;\n  local_34.__count = param_2->__count;\n  uVar2 = __uselocale(*(undefined4 *)(param_1 + 8));\n  *param_5 = param_3;\n  *param_8 = param_6;\njoined_r0x0027afb1:\n  do {\n    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }\n    while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }\n    iVar6 = 2;\n    param_2->__count = local_34.__count;\n    param_2->__value = local_34.__value;\n    param_3 = *param_5;\n  } while( true );\nLAB_0027b0e0:\n  iVar6 = 0;\n  param_3 = pwVar5;\n  goto joined_r0x0027afb1;\n}" primitive_type (function_declarator "FUN_0027af60(int param_1,mbstate_t *param_2,wchar_t *param_3,wchar_t *param_4,wchar_t **param_5,\n                uint param_6,char *param_7,uint *param_8)" identifier (parameter_list "(int param_1,mbstate_t *param_2,wchar_t *param_3,wchar_t *param_4,wchar_t **param_5,\n                uint param_6,char *param_7,uint *param_8)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "mbstate_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "wchar_t *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "wchar_t *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "wchar_t **param_5" type_identifier (pointer_declarator "**param_5" * (pointer_declarator "*param_5" * identifier))) , (parameter_declaration "uint param_6" type_identifier identifier) , (parameter_declaration "char *param_7" primitive_type (pointer_declarator "*param_7" * identifier)) , (parameter_declaration "uint *param_8" type_identifier (pointer_declarator "*param_8" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  undefined4 uVar2;\n  wchar_t *pwVar3;\n  char *pcVar4;\n  wchar_t *pwVar5;\n  int iVar6;\n  size_t sVar7;\n  mbstate_t local_34;\n  char local_2c [24];\n  undefined4 uStack_14;\n  \n  iVar6 = 0;\n  uStack_14 = 0x27af6b;\n  local_34.__value = param_2->__value;\n  local_34.__count = param_2->__count;\n  uVar2 = __uselocale(*(undefined4 *)(param_1 + 8));\n  *param_5 = param_3;\n  *param_8 = param_6;\njoined_r0x0027afb1:\n  do {\n    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }\n    while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }\n    iVar6 = 2;\n    param_2->__count = local_34.__count;\n    param_2->__value = local_34.__value;\n    param_3 = *param_5;\n  } while( true );\nLAB_0027b0e0:\n  iVar6 = 0;\n  param_3 = pwVar5;\n  goto joined_r0x0027afb1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "wchar_t *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "wchar_t *pwVar5;" type_identifier (pointer_declarator "*pwVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "size_t sVar7;" primitive_type identifier ;) (declaration "mbstate_t local_34;" type_identifier identifier ;) (declaration "char local_2c [24];" primitive_type (array_declarator "local_2c [24]" identifier [ number_literal ]) ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "uStack_14 = 0x27af6b;" (assignment_expression "uStack_14 = 0x27af6b" identifier = number_literal) ;) (expression_statement "local_34.__value = param_2->__value;" (assignment_expression "local_34.__value = param_2->__value" (field_expression "local_34.__value" identifier . field_identifier) = (field_expression "param_2->__value" identifier -> field_identifier)) ;) (expression_statement "local_34.__count = param_2->__count;" (assignment_expression "local_34.__count = param_2->__count" (field_expression "local_34.__count" identifier . field_identifier) = (field_expression "param_2->__count" identifier -> field_identifier)) ;) (expression_statement "uVar2 = __uselocale(*(undefined4 *)(param_1 + 8));" (assignment_expression "uVar2 = __uselocale(*(undefined4 *)(param_1 + 8))" identifier = (call_expression "__uselocale(*(undefined4 *)(param_1 + 8))" identifier (argument_list "(*(undefined4 *)(param_1 + 8))" ( (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) )))) ;) (expression_statement "*param_5 = param_3;" (assignment_expression "*param_5 = param_3" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = param_6;" (assignment_expression "*param_8 = param_6" (pointer_expression "*param_8" * identifier) = identifier) ;) (labeled_statement "joined_r0x0027afb1:\n  do {\n    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }\n    while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }\n    iVar6 = 2;\n    param_2->__count = local_34.__count;\n    param_2->__value = local_34.__value;\n    param_3 = *param_5;\n  } while( true );" statement_identifier : (do_statement "do {\n    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }\n    while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }\n    iVar6 = 2;\n    param_2->__count = local_34.__count;\n    param_2->__value = local_34.__value;\n    param_3 = *param_5;\n  } while( true );" do (compound_statement "{\n    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }\n    while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }\n    iVar6 = 2;\n    param_2->__count = local_34.__count;\n    param_2->__value = local_34.__value;\n    param_3 = *param_5;\n  }" { (if_statement "if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }" if (parenthesized_expression "(((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0))" ( (binary_expression "((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)" (parenthesized_expression "((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4))" ( (binary_expression "(param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)" (parenthesized_expression "(param_4 <= param_3)" ( (binary_expression "param_4 <= param_3" identifier <= identifier) )) || (parenthesized_expression "(pcVar4 = (char *)*param_8, param_7 <= pcVar4)" ( (comma_expression "pcVar4 = (char *)*param_8, param_7 <= pcVar4" (assignment_expression "pcVar4 = (char *)*param_8" identifier = (cast_expression "(char *)*param_8" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_8" * identifier))) , (binary_expression "param_7 <= pcVar4" identifier <= identifier)) ))) )) || (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) ))) )) (compound_statement "{\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }" { (labeled_statement "LAB_0027b059:\n      __uselocale(uVar2);" statement_identifier : (expression_statement "__uselocale(uVar2);" (call_expression "__uselocale(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;)) (return_statement "return iVar6;" return identifier ;) })) (while_statement "while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }" { (expression_statement "sVar7 = (int)param_4 - (int)param_3 >> 2;" (assignment_expression "sVar7 = (int)param_4 - (int)param_3 >> 2" identifier = (binary_expression "(int)param_4 - (int)param_3 >> 2" (binary_expression "(int)param_4 - (int)param_3" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ;) (expression_statement "pwVar3 = wmemchr(param_3,L'\0',sVar7);" (assignment_expression "pwVar3 = wmemchr(param_3,L'\0',sVar7)" identifier = (call_expression "wmemchr(param_3,L'\0',sVar7)" identifier (argument_list "(param_3,L'\0',sVar7)" ( identifier , (char_literal "L'\0'" L' escape_sequence ') , identifier )))) ;) (expression_statement "pwVar5 = param_4;" (assignment_expression "pwVar5 = param_4" identifier = identifier) ;) (if_statement "if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }" if (parenthesized_expression "(pwVar3 != (wchar_t *)0x0)" ( (binary_expression "pwVar3 != (wchar_t *)0x0" identifier != (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }" { (expression_statement "sVar7 = (int)pwVar3 - (int)param_3 >> 2;" (assignment_expression "sVar7 = (int)pwVar3 - (int)param_3 >> 2" identifier = (binary_expression "(int)pwVar3 - (int)param_3 >> 2" (binary_expression "(int)pwVar3 - (int)param_3" (cast_expression "(int)pwVar3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ;) (expression_statement "pwVar5 = pwVar3;" (assignment_expression "pwVar5 = pwVar3" identifier = identifier) ;) })) (expression_statement "sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);" (assignment_expression "sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2)" identifier = (call_expression "wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2)" identifier (argument_list "(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2)" ( identifier , identifier , identifier , (binary_expression "(int)param_7 - (int)pcVar4" (cast_expression "(int)param_7" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar4" ( (type_descriptor "int" primitive_type) ) identifier)) , identifier )))) ;) (if_statement "if (sVar7 == 0xffffffff) break;" if (parenthesized_expression "(sVar7 == 0xffffffff)" ( (binary_expression "sVar7 == 0xffffffff" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "param_3 = *param_5;" (assignment_expression "param_3 = *param_5" identifier = (pointer_expression "*param_5" * identifier)) ;) (expression_statement "uVar1 = *param_8;" (assignment_expression "uVar1 = *param_8" identifier = (pointer_expression "*param_8" * identifier)) ;) (if_statement "if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }" if (parenthesized_expression "((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5))" ( (binary_expression "(param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)" (parenthesized_expression "(param_3 != (wchar_t *)0x0)" ( (binary_expression "param_3 != (wchar_t *)0x0" identifier != (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(param_3 < pwVar5)" ( (binary_expression "param_3 < pwVar5" identifier < identifier) ))) )) (compound_statement "{\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }" { (expression_statement "*param_8 = sVar7 + uVar1;" (assignment_expression "*param_8 = sVar7 + uVar1" (pointer_expression "*param_8" * identifier) = (binary_expression "sVar7 + uVar1" identifier + identifier)) ;) (expression_statement "iVar6 = 1;" (assignment_expression "iVar6 = 1" identifier = number_literal) ;) (goto_statement "goto joined_r0x0027afb1;" goto statement_identifier ;) })) (expression_statement "*param_5 = pwVar5;" (assignment_expression "*param_5 = pwVar5" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = sVar7 + uVar1;" (assignment_expression "*param_8 = sVar7 + uVar1" (pointer_expression "*param_8" * identifier) = (binary_expression "sVar7 + uVar1" identifier + identifier)) ;) (if_statement "if (param_4 <= pwVar5) goto LAB_0027b0e0;" if (parenthesized_expression "(param_4 <= pwVar5)" ( (binary_expression "param_4 <= pwVar5" identifier <= identifier) )) (goto_statement "goto LAB_0027b0e0;" goto statement_identifier ;)) (expression_statement "local_34.__value = param_2->__value;" (assignment_expression "local_34.__value = param_2->__value" (field_expression "local_34.__value" identifier . field_identifier) = (field_expression "param_2->__value" identifier -> field_identifier)) ;) (expression_statement "local_34.__count = param_2->__count;" (assignment_expression "local_34.__count = param_2->__count" (field_expression "local_34.__count" identifier . field_identifier) = (field_expression "param_2->__count" identifier -> field_identifier)) ;) (expression_statement "sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);" (assignment_expression "sVar7 = wcrtomb(local_2c,*pwVar5,&local_34)" identifier = (call_expression "wcrtomb(local_2c,*pwVar5,&local_34)" identifier (argument_list "(local_2c,*pwVar5,&local_34)" ( identifier , (pointer_expression "*pwVar5" * identifier) , (pointer_expression "&local_34" & identifier) )))) ;) (if_statement "if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }" if (parenthesized_expression "((uint)((int)param_7 - (int)*param_8) < sVar7)" ( (binary_expression "(uint)((int)param_7 - (int)*param_8) < sVar7" (call_expression "(uint)((int)param_7 - (int)*param_8)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)param_7 - (int)*param_8)" ( (binary_expression "(int)param_7 - (int)*param_8" (cast_expression "(int)param_7" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)*param_8" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*param_8" * identifier))) ))) < identifier) )) (compound_statement "{\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }" { (expression_statement "iVar6 = 1;" (assignment_expression "iVar6 = 1" identifier = number_literal) ;) (goto_statement "goto LAB_0027b059;" goto statement_identifier ;) })) (expression_statement "memcpy((void *)*param_8,local_2c,sVar7);" (call_expression "memcpy((void *)*param_8,local_2c,sVar7)" identifier (argument_list "((void *)*param_8,local_2c,sVar7)" ( (cast_expression "(void *)*param_8" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_8" * identifier)) , identifier , identifier ))) ;) (expression_statement "param_2->__count = local_34.__count;" (assignment_expression "param_2->__count = local_34.__count" (field_expression "param_2->__count" identifier -> field_identifier) = (field_expression "local_34.__count" identifier . field_identifier)) ;) (expression_statement "param_2->__value = local_34.__value;" (assignment_expression "param_2->__value = local_34.__value" (field_expression "param_2->__value" identifier -> field_identifier) = (field_expression "local_34.__value" identifier . field_identifier)) ;) (expression_statement "pcVar4 = (char *)(*param_8 + sVar7);" (assignment_expression "pcVar4 = (char *)(*param_8 + sVar7)" identifier = (cast_expression "(char *)(*param_8 + sVar7)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_8 + sVar7)" ( (binary_expression "*param_8 + sVar7" (pointer_expression "*param_8" * identifier) + identifier) )))) ;) (expression_statement "*param_8 = (uint)pcVar4;" (assignment_expression "*param_8 = (uint)pcVar4" (pointer_expression "*param_8" * identifier) = (cast_expression "(uint)pcVar4" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "param_3 = *param_5 + 1;" (assignment_expression "param_3 = *param_5 + 1" identifier = (binary_expression "*param_5 + 1" (pointer_expression "*param_5" * identifier) + number_literal)) ;) (expression_statement "*param_5 = param_3;" (assignment_expression "*param_5 = param_3" (pointer_expression "*param_5" * identifier) = identifier) ;) (if_statement "if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }" if (parenthesized_expression "((param_4 <= param_3) || (param_7 <= pcVar4))" ( (binary_expression "(param_4 <= param_3) || (param_7 <= pcVar4)" (parenthesized_expression "(param_4 <= param_3)" ( (binary_expression "param_4 <= param_3" identifier <= identifier) )) || (parenthesized_expression "(param_7 <= pcVar4)" ( (binary_expression "param_7 <= pcVar4" identifier <= identifier) ))) )) (compound_statement "{\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }" { (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_0027b059;" goto statement_identifier ;) })) })) (if_statement "if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }" if (parenthesized_expression "(param_3 < *param_5)" ( (binary_expression "param_3 < *param_5" identifier < (pointer_expression "*param_5" * identifier)) )) (compound_statement "{\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }" { (expression_statement "pcVar4 = (char *)*param_8;" (assignment_expression "pcVar4 = (char *)*param_8" identifier = (cast_expression "(char *)*param_8" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_8" * identifier))) ;) (do_statement "do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);" do (compound_statement "{\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      }" { (expression_statement "pwVar5 = param_3 + 1;" (assignment_expression "pwVar5 = param_3 + 1" identifier = (binary_expression "param_3 + 1" identifier + number_literal)) ;) (expression_statement "sVar7 = wcrtomb(pcVar4,*param_3,&local_34);" (assignment_expression "sVar7 = wcrtomb(pcVar4,*param_3,&local_34)" identifier = (call_expression "wcrtomb(pcVar4,*param_3,&local_34)" identifier (argument_list "(pcVar4,*param_3,&local_34)" ( identifier , (pointer_expression "*param_3" * identifier) , (pointer_expression "&local_34" & identifier) )))) ;) (expression_statement "pcVar4 = (char *)(sVar7 + *param_8);" (assignment_expression "pcVar4 = (char *)(sVar7 + *param_8)" identifier = (cast_expression "(char *)(sVar7 + *param_8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(sVar7 + *param_8)" ( (binary_expression "sVar7 + *param_8" identifier + (pointer_expression "*param_8" * identifier)) )))) ;) (expression_statement "*param_8 = (uint)pcVar4;" (assignment_expression "*param_8 = (uint)pcVar4" (pointer_expression "*param_8" * identifier) = (cast_expression "(uint)pcVar4" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "param_3 = pwVar5;" (assignment_expression "param_3 = pwVar5" identifier = identifier) ;) }) while (parenthesized_expression "(pwVar5 < *param_5)" ( (binary_expression "pwVar5 < *param_5" identifier < (pointer_expression "*param_5" * identifier)) )) ;) })) (expression_statement "iVar6 = 2;" (assignment_expression "iVar6 = 2" identifier = number_literal) ;) (expression_statement "param_2->__count = local_34.__count;" (assignment_expression "param_2->__count = local_34.__count" (field_expression "param_2->__count" identifier -> field_identifier) = (field_expression "local_34.__count" identifier . field_identifier)) ;) (expression_statement "param_2->__value = local_34.__value;" (assignment_expression "param_2->__value = local_34.__value" (field_expression "param_2->__value" identifier -> field_identifier) = (field_expression "local_34.__value" identifier . field_identifier)) ;) (expression_statement "param_3 = *param_5;" (assignment_expression "param_3 = *param_5" identifier = (pointer_expression "*param_5" * identifier)) ;) }) while (parenthesized_expression "( true )" ( true )) ;)) (labeled_statement "LAB_0027b0e0:\n  iVar6 = 0;" statement_identifier : (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;)) (expression_statement "param_3 = pwVar5;" (assignment_expression "param_3 = pwVar5" identifier = identifier) ;) (goto_statement "goto joined_r0x0027afb1;" goto statement_identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * (pointer_declarator * IDENT))) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = (field_expression IDENT -> field_identifier)) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = (field_expression IDENT -> field_identifier)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (labeled_statement statement_identifier : (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) , (binary_expression IDENT <= IDENT)) ))) )) || (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;)) (return_statement return IDENT ;) })) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) >> LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (char_literal L' escape_sequence ') , IDENT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) >> LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression IDENT < IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = (field_expression IDENT -> field_identifier)) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = (field_expression IDENT -> field_identifier)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression * IDENT) , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT))) ))) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (field_expression IDENT -> field_identifier) = (field_expression IDENT . field_identifier)) ;) (expression_statement (assignment_expression (field_expression IDENT -> field_identifier) = (field_expression IDENT . field_identifier)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + IDENT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) || (parenthesized_expression ( (binary_expression IDENT <= IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression * IDENT) , (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (pointer_expression * IDENT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * IDENT)) )) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (field_expression IDENT -> field_identifier) = (field_expression IDENT . field_identifier)) ;) (expression_statement (assignment_expression (field_expression IDENT -> field_identifier) = (field_expression IDENT . field_identifier)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }) while (parenthesized_expression ( BOOL )) ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;) })))
(function_definition "int FUN_0027af60(int param_1,mbstate_t *param_2,wchar_t *param_3,wchar_t *param_4,wchar_t **param_5,\n                uint param_6,char *param_7,uint *param_8)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  wchar_t *pwVar3;\n  char *pcVar4;\n  wchar_t *pwVar5;\n  int iVar6;\n  size_t sVar7;\n  mbstate_t local_34;\n  char local_2c [24];\n  undefined4 uStack_14;\n  \n  iVar6 = 0;\n  uStack_14 = 0x27af6b;\n  local_34.__value = param_2->__value;\n  local_34.__count = param_2->__count;\n  uVar2 = __uselocale(*(undefined4 *)(param_1 + 8));\n  *param_5 = param_3;\n  *param_8 = param_6;\njoined_r0x0027afb1:\n  do {\n    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }\n    while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }\n    iVar6 = 2;\n    param_2->__count = local_34.__count;\n    param_2->__value = local_34.__value;\n    param_3 = *param_5;\n  } while( true );\nLAB_0027b0e0:\n  iVar6 = 0;\n  param_3 = pwVar5;\n  goto joined_r0x0027afb1;\n}" (primitive_type "int") (function_declarator "FUN_0027af60(int param_1,mbstate_t *param_2,wchar_t *param_3,wchar_t *param_4,wchar_t **param_5,\n                uint param_6,char *param_7,uint *param_8)" (identifier "FUN_0027af60") (parameter_list "(int param_1,mbstate_t *param_2,wchar_t *param_3,wchar_t *param_4,wchar_t **param_5,\n                uint param_6,char *param_7,uint *param_8)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "mbstate_t *param_2" (type_identifier "mbstate_t") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "wchar_t *param_3" (type_identifier "wchar_t") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "wchar_t *param_4" (type_identifier "wchar_t") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "wchar_t **param_5" (type_identifier "wchar_t") (pointer_declarator "**param_5" (* "*") (pointer_declarator "*param_5" (* "*") (identifier "param_5")))) (, ",") (parameter_declaration "uint param_6" (type_identifier "uint") (identifier "param_6")) (, ",") (parameter_declaration "char *param_7" (primitive_type "char") (pointer_declarator "*param_7" (* "*") (identifier "param_7"))) (, ",") (parameter_declaration "uint *param_8" (type_identifier "uint") (pointer_declarator "*param_8" (* "*") (identifier "param_8"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  undefined4 uVar2;\n  wchar_t *pwVar3;\n  char *pcVar4;\n  wchar_t *pwVar5;\n  int iVar6;\n  size_t sVar7;\n  mbstate_t local_34;\n  char local_2c [24];\n  undefined4 uStack_14;\n  \n  iVar6 = 0;\n  uStack_14 = 0x27af6b;\n  local_34.__value = param_2->__value;\n  local_34.__count = param_2->__count;\n  uVar2 = __uselocale(*(undefined4 *)(param_1 + 8));\n  *param_5 = param_3;\n  *param_8 = param_6;\njoined_r0x0027afb1:\n  do {\n    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }\n    while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }\n    iVar6 = 2;\n    param_2->__count = local_34.__count;\n    param_2->__value = local_34.__value;\n    param_3 = *param_5;\n  } while( true );\nLAB_0027b0e0:\n  iVar6 = 0;\n  param_3 = pwVar5;\n  goto joined_r0x0027afb1;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "wchar_t *pwVar3;" (type_identifier "wchar_t") (pointer_declarator "*pwVar3" (* "*") (identifier "pwVar3")) (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "wchar_t *pwVar5;" (type_identifier "wchar_t") (pointer_declarator "*pwVar5" (* "*") (identifier "pwVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "size_t sVar7;" (primitive_type "size_t") (identifier "sVar7") (; ";")) (declaration "mbstate_t local_34;" (type_identifier "mbstate_t") (identifier "local_34") (; ";")) (declaration "char local_2c [24];" (primitive_type "char") (array_declarator "local_2c [24]" (identifier "local_2c") ([ "[") (number_literal "24") (] "]")) (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" (identifier "iVar6") (= "=") (number_literal "0")) (; ";")) (expression_statement "uStack_14 = 0x27af6b;" (assignment_expression "uStack_14 = 0x27af6b" (identifier "uStack_14") (= "=") (number_literal "0x27af6b")) (; ";")) (expression_statement "local_34.__value = param_2->__value;" (assignment_expression "local_34.__value = param_2->__value" (field_expression "local_34.__value" (identifier "local_34") (. ".") (field_identifier "__value")) (= "=") (field_expression "param_2->__value" (identifier "param_2") (-> "->") (field_identifier "__value"))) (; ";")) (expression_statement "local_34.__count = param_2->__count;" (assignment_expression "local_34.__count = param_2->__count" (field_expression "local_34.__count" (identifier "local_34") (. ".") (field_identifier "__count")) (= "=") (field_expression "param_2->__count" (identifier "param_2") (-> "->") (field_identifier "__count"))) (; ";")) (expression_statement "uVar2 = __uselocale(*(undefined4 *)(param_1 + 8));" (assignment_expression "uVar2 = __uselocale(*(undefined4 *)(param_1 + 8))" (identifier "uVar2") (= "=") (call_expression "__uselocale(*(undefined4 *)(param_1 + 8))" (identifier "__uselocale") (argument_list "(*(undefined4 *)(param_1 + 8))" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) () ")")))) (; ";")) (expression_statement "*param_5 = param_3;" (assignment_expression "*param_5 = param_3" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "param_3")) (; ";")) (expression_statement "*param_8 = param_6;" (assignment_expression "*param_8 = param_6" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (= "=") (identifier "param_6")) (; ";")) (labeled_statement "joined_r0x0027afb1:\n  do {\n    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }\n    while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }\n    iVar6 = 2;\n    param_2->__count = local_34.__count;\n    param_2->__value = local_34.__value;\n    param_3 = *param_5;\n  } while( true );" (statement_identifier "joined_r0x0027afb1") (: ":") (do_statement "do {\n    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }\n    while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }\n    iVar6 = 2;\n    param_2->__count = local_34.__count;\n    param_2->__value = local_34.__value;\n    param_3 = *param_5;\n  } while( true );" (do "do") (compound_statement "{\n    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }\n    while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }\n    if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }\n    iVar6 = 2;\n    param_2->__count = local_34.__count;\n    param_2->__value = local_34.__value;\n    param_3 = *param_5;\n  }" ({ "{") (if_statement "if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }" (if "if") (parenthesized_expression "(((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0))" (( "(") (binary_expression "((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)" (parenthesized_expression "((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4))" (( "(") (binary_expression "(param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)" (parenthesized_expression "(param_4 <= param_3)" (( "(") (binary_expression "param_4 <= param_3" (identifier "param_4") (<= "<=") (identifier "param_3")) () ")")) (|| "||") (parenthesized_expression "(pcVar4 = (char *)*param_8, param_7 <= pcVar4)" (( "(") (comma_expression "pcVar4 = (char *)*param_8, param_7 <= pcVar4" (assignment_expression "pcVar4 = (char *)*param_8" (identifier "pcVar4") (= "=") (cast_expression "(char *)*param_8" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_8" (* "*") (identifier "param_8")))) (, ",") (binary_expression "param_7 <= pcVar4" (identifier "param_7") (<= "<=") (identifier "pcVar4"))) () ")"))) () ")")) (|| "||") (parenthesized_expression "(iVar6 != 0)" (( "(") (binary_expression "iVar6 != 0" (identifier "iVar6") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\nLAB_0027b059:\n      __uselocale(uVar2);\n      return iVar6;\n    }" ({ "{") (labeled_statement "LAB_0027b059:\n      __uselocale(uVar2);" (statement_identifier "LAB_0027b059") (: ":") (expression_statement "__uselocale(uVar2);" (call_expression "__uselocale(uVar2)" (identifier "__uselocale") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";"))) (return_statement "return iVar6;" (return "return") (identifier "iVar6") (; ";")) (} "}"))) (while_statement "while( true ) {\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      sVar7 = (int)param_4 - (int)param_3 >> 2;\n      pwVar3 = wmemchr(param_3,L'\0',sVar7);\n      pwVar5 = param_4;\n      if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }\n      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);\n      if (sVar7 == 0xffffffff) break;\n      param_3 = *param_5;\n      uVar1 = *param_8;\n      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }\n      *param_5 = pwVar5;\n      *param_8 = sVar7 + uVar1;\n      if (param_4 <= pwVar5) goto LAB_0027b0e0;\n      local_34.__value = param_2->__value;\n      local_34.__count = param_2->__count;\n      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);\n      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }\n      memcpy((void *)*param_8,local_2c,sVar7);\n      param_2->__count = local_34.__count;\n      param_2->__value = local_34.__value;\n      pcVar4 = (char *)(*param_8 + sVar7);\n      *param_8 = (uint)pcVar4;\n      param_3 = *param_5 + 1;\n      *param_5 = param_3;\n      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }\n    }" ({ "{") (expression_statement "sVar7 = (int)param_4 - (int)param_3 >> 2;" (assignment_expression "sVar7 = (int)param_4 - (int)param_3 >> 2" (identifier "sVar7") (= "=") (binary_expression "(int)param_4 - (int)param_3 >> 2" (binary_expression "(int)param_4 - (int)param_3" (cast_expression "(int)param_4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_4")) (- "-") (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3"))) (>> ">>") (number_literal "2"))) (; ";")) (expression_statement "pwVar3 = wmemchr(param_3,L'\0',sVar7);" (assignment_expression "pwVar3 = wmemchr(param_3,L'\0',sVar7)" (identifier "pwVar3") (= "=") (call_expression "wmemchr(param_3,L'\0',sVar7)" (identifier "wmemchr") (argument_list "(param_3,L'\0',sVar7)" (( "(") (identifier "param_3") (, ",") (char_literal "L'\0'" (L' "L'") (escape_sequence "\0") (' "'")) (, ",") (identifier "sVar7") () ")")))) (; ";")) (expression_statement "pwVar5 = param_4;" (assignment_expression "pwVar5 = param_4" (identifier "pwVar5") (= "=") (identifier "param_4")) (; ";")) (if_statement "if (pwVar3 != (wchar_t *)0x0) {\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }" (if "if") (parenthesized_expression "(pwVar3 != (wchar_t *)0x0)" (( "(") (binary_expression "pwVar3 != (wchar_t *)0x0" (identifier "pwVar3") (!= "!=") (cast_expression "(wchar_t *)0x0" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        sVar7 = (int)pwVar3 - (int)param_3 >> 2;\n        pwVar5 = pwVar3;\n      }" ({ "{") (expression_statement "sVar7 = (int)pwVar3 - (int)param_3 >> 2;" (assignment_expression "sVar7 = (int)pwVar3 - (int)param_3 >> 2" (identifier "sVar7") (= "=") (binary_expression "(int)pwVar3 - (int)param_3 >> 2" (binary_expression "(int)pwVar3 - (int)param_3" (cast_expression "(int)pwVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pwVar3")) (- "-") (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3"))) (>> ">>") (number_literal "2"))) (; ";")) (expression_statement "pwVar5 = pwVar3;" (assignment_expression "pwVar5 = pwVar3" (identifier "pwVar5") (= "=") (identifier "pwVar3")) (; ";")) (} "}"))) (expression_statement "sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);" (assignment_expression "sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2)" (identifier "sVar7") (= "=") (call_expression "wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2)" (identifier "wcsnrtombs") (argument_list "(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2)" (( "(") (identifier "pcVar4") (, ",") (identifier "param_5") (, ",") (identifier "sVar7") (, ",") (binary_expression "(int)param_7 - (int)pcVar4" (cast_expression "(int)param_7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_7")) (- "-") (cast_expression "(int)pcVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pcVar4"))) (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (sVar7 == 0xffffffff) break;" (if "if") (parenthesized_expression "(sVar7 == 0xffffffff)" (( "(") (binary_expression "sVar7 == 0xffffffff" (identifier "sVar7") (== "==") (number_literal "0xffffffff")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "param_3 = *param_5;" (assignment_expression "param_3 = *param_5" (identifier "param_3") (= "=") (pointer_expression "*param_5" (* "*") (identifier "param_5"))) (; ";")) (expression_statement "uVar1 = *param_8;" (assignment_expression "uVar1 = *param_8" (identifier "uVar1") (= "=") (pointer_expression "*param_8" (* "*") (identifier "param_8"))) (; ";")) (if_statement "if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }" (if "if") (parenthesized_expression "((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5))" (( "(") (binary_expression "(param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)" (parenthesized_expression "(param_3 != (wchar_t *)0x0)" (( "(") (binary_expression "param_3 != (wchar_t *)0x0" (identifier "param_3") (!= "!=") (cast_expression "(wchar_t *)0x0" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(param_3 < pwVar5)" (( "(") (binary_expression "param_3 < pwVar5" (identifier "param_3") (< "<") (identifier "pwVar5")) () ")"))) () ")")) (compound_statement "{\n        *param_8 = sVar7 + uVar1;\n        iVar6 = 1;\n        goto joined_r0x0027afb1;\n      }" ({ "{") (expression_statement "*param_8 = sVar7 + uVar1;" (assignment_expression "*param_8 = sVar7 + uVar1" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (= "=") (binary_expression "sVar7 + uVar1" (identifier "sVar7") (+ "+") (identifier "uVar1"))) (; ";")) (expression_statement "iVar6 = 1;" (assignment_expression "iVar6 = 1" (identifier "iVar6") (= "=") (number_literal "1")) (; ";")) (goto_statement "goto joined_r0x0027afb1;" (goto "goto") (statement_identifier "joined_r0x0027afb1") (; ";")) (} "}"))) (expression_statement "*param_5 = pwVar5;" (assignment_expression "*param_5 = pwVar5" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "pwVar5")) (; ";")) (expression_statement "*param_8 = sVar7 + uVar1;" (assignment_expression "*param_8 = sVar7 + uVar1" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (= "=") (binary_expression "sVar7 + uVar1" (identifier "sVar7") (+ "+") (identifier "uVar1"))) (; ";")) (if_statement "if (param_4 <= pwVar5) goto LAB_0027b0e0;" (if "if") (parenthesized_expression "(param_4 <= pwVar5)" (( "(") (binary_expression "param_4 <= pwVar5" (identifier "param_4") (<= "<=") (identifier "pwVar5")) () ")")) (goto_statement "goto LAB_0027b0e0;" (goto "goto") (statement_identifier "LAB_0027b0e0") (; ";"))) (expression_statement "local_34.__value = param_2->__value;" (assignment_expression "local_34.__value = param_2->__value" (field_expression "local_34.__value" (identifier "local_34") (. ".") (field_identifier "__value")) (= "=") (field_expression "param_2->__value" (identifier "param_2") (-> "->") (field_identifier "__value"))) (; ";")) (expression_statement "local_34.__count = param_2->__count;" (assignment_expression "local_34.__count = param_2->__count" (field_expression "local_34.__count" (identifier "local_34") (. ".") (field_identifier "__count")) (= "=") (field_expression "param_2->__count" (identifier "param_2") (-> "->") (field_identifier "__count"))) (; ";")) (expression_statement "sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);" (assignment_expression "sVar7 = wcrtomb(local_2c,*pwVar5,&local_34)" (identifier "sVar7") (= "=") (call_expression "wcrtomb(local_2c,*pwVar5,&local_34)" (identifier "wcrtomb") (argument_list "(local_2c,*pwVar5,&local_34)" (( "(") (identifier "local_2c") (, ",") (pointer_expression "*pwVar5" (* "*") (identifier "pwVar5")) (, ",") (pointer_expression "&local_34" (& "&") (identifier "local_34")) () ")")))) (; ";")) (if_statement "if ((uint)((int)param_7 - (int)*param_8) < sVar7) {\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }" (if "if") (parenthesized_expression "((uint)((int)param_7 - (int)*param_8) < sVar7)" (( "(") (binary_expression "(uint)((int)param_7 - (int)*param_8) < sVar7" (call_expression "(uint)((int)param_7 - (int)*param_8)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((int)param_7 - (int)*param_8)" (( "(") (binary_expression "(int)param_7 - (int)*param_8" (cast_expression "(int)param_7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_7")) (- "-") (cast_expression "(int)*param_8" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*param_8" (* "*") (identifier "param_8")))) () ")"))) (< "<") (identifier "sVar7")) () ")")) (compound_statement "{\n        iVar6 = 1;\n        goto LAB_0027b059;\n      }" ({ "{") (expression_statement "iVar6 = 1;" (assignment_expression "iVar6 = 1" (identifier "iVar6") (= "=") (number_literal "1")) (; ";")) (goto_statement "goto LAB_0027b059;" (goto "goto") (statement_identifier "LAB_0027b059") (; ";")) (} "}"))) (expression_statement "memcpy((void *)*param_8,local_2c,sVar7);" (call_expression "memcpy((void *)*param_8,local_2c,sVar7)" (identifier "memcpy") (argument_list "((void *)*param_8,local_2c,sVar7)" (( "(") (cast_expression "(void *)*param_8" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_8" (* "*") (identifier "param_8"))) (, ",") (identifier "local_2c") (, ",") (identifier "sVar7") () ")"))) (; ";")) (expression_statement "param_2->__count = local_34.__count;" (assignment_expression "param_2->__count = local_34.__count" (field_expression "param_2->__count" (identifier "param_2") (-> "->") (field_identifier "__count")) (= "=") (field_expression "local_34.__count" (identifier "local_34") (. ".") (field_identifier "__count"))) (; ";")) (expression_statement "param_2->__value = local_34.__value;" (assignment_expression "param_2->__value = local_34.__value" (field_expression "param_2->__value" (identifier "param_2") (-> "->") (field_identifier "__value")) (= "=") (field_expression "local_34.__value" (identifier "local_34") (. ".") (field_identifier "__value"))) (; ";")) (expression_statement "pcVar4 = (char *)(*param_8 + sVar7);" (assignment_expression "pcVar4 = (char *)(*param_8 + sVar7)" (identifier "pcVar4") (= "=") (cast_expression "(char *)(*param_8 + sVar7)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_8 + sVar7)" (( "(") (binary_expression "*param_8 + sVar7" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (+ "+") (identifier "sVar7")) () ")")))) (; ";")) (expression_statement "*param_8 = (uint)pcVar4;" (assignment_expression "*param_8 = (uint)pcVar4" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (= "=") (cast_expression "(uint)pcVar4" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "pcVar4"))) (; ";")) (expression_statement "param_3 = *param_5 + 1;" (assignment_expression "param_3 = *param_5 + 1" (identifier "param_3") (= "=") (binary_expression "*param_5 + 1" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*param_5 = param_3;" (assignment_expression "*param_5 = param_3" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "param_3")) (; ";")) (if_statement "if ((param_4 <= param_3) || (param_7 <= pcVar4)) {\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }" (if "if") (parenthesized_expression "((param_4 <= param_3) || (param_7 <= pcVar4))" (( "(") (binary_expression "(param_4 <= param_3) || (param_7 <= pcVar4)" (parenthesized_expression "(param_4 <= param_3)" (( "(") (binary_expression "param_4 <= param_3" (identifier "param_4") (<= "<=") (identifier "param_3")) () ")")) (|| "||") (parenthesized_expression "(param_7 <= pcVar4)" (( "(") (binary_expression "param_7 <= pcVar4" (identifier "param_7") (<= "<=") (identifier "pcVar4")) () ")"))) () ")")) (compound_statement "{\n        iVar6 = 0;\n        goto LAB_0027b059;\n      }" ({ "{") (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" (identifier "iVar6") (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_0027b059;" (goto "goto") (statement_identifier "LAB_0027b059") (; ";")) (} "}"))) (} "}"))) (if_statement "if (param_3 < *param_5) {\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }" (if "if") (parenthesized_expression "(param_3 < *param_5)" (( "(") (binary_expression "param_3 < *param_5" (identifier "param_3") (< "<") (pointer_expression "*param_5" (* "*") (identifier "param_5"))) () ")")) (compound_statement "{\n      pcVar4 = (char *)*param_8;\n      do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);\n    }" ({ "{") (expression_statement "pcVar4 = (char *)*param_8;" (assignment_expression "pcVar4 = (char *)*param_8" (identifier "pcVar4") (= "=") (cast_expression "(char *)*param_8" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_8" (* "*") (identifier "param_8")))) (; ";")) (do_statement "do {\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      } while (pwVar5 < *param_5);" (do "do") (compound_statement "{\n        pwVar5 = param_3 + 1;\n        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);\n        pcVar4 = (char *)(sVar7 + *param_8);\n        *param_8 = (uint)pcVar4;\n        param_3 = pwVar5;\n      }" ({ "{") (expression_statement "pwVar5 = param_3 + 1;" (assignment_expression "pwVar5 = param_3 + 1" (identifier "pwVar5") (= "=") (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "sVar7 = wcrtomb(pcVar4,*param_3,&local_34);" (assignment_expression "sVar7 = wcrtomb(pcVar4,*param_3,&local_34)" (identifier "sVar7") (= "=") (call_expression "wcrtomb(pcVar4,*param_3,&local_34)" (identifier "wcrtomb") (argument_list "(pcVar4,*param_3,&local_34)" (( "(") (identifier "pcVar4") (, ",") (pointer_expression "*param_3" (* "*") (identifier "param_3")) (, ",") (pointer_expression "&local_34" (& "&") (identifier "local_34")) () ")")))) (; ";")) (expression_statement "pcVar4 = (char *)(sVar7 + *param_8);" (assignment_expression "pcVar4 = (char *)(sVar7 + *param_8)" (identifier "pcVar4") (= "=") (cast_expression "(char *)(sVar7 + *param_8)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(sVar7 + *param_8)" (( "(") (binary_expression "sVar7 + *param_8" (identifier "sVar7") (+ "+") (pointer_expression "*param_8" (* "*") (identifier "param_8"))) () ")")))) (; ";")) (expression_statement "*param_8 = (uint)pcVar4;" (assignment_expression "*param_8 = (uint)pcVar4" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (= "=") (cast_expression "(uint)pcVar4" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "pcVar4"))) (; ";")) (expression_statement "param_3 = pwVar5;" (assignment_expression "param_3 = pwVar5" (identifier "param_3") (= "=") (identifier "pwVar5")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pwVar5 < *param_5)" (( "(") (binary_expression "pwVar5 < *param_5" (identifier "pwVar5") (< "<") (pointer_expression "*param_5" (* "*") (identifier "param_5"))) () ")")) (; ";")) (} "}"))) (expression_statement "iVar6 = 2;" (assignment_expression "iVar6 = 2" (identifier "iVar6") (= "=") (number_literal "2")) (; ";")) (expression_statement "param_2->__count = local_34.__count;" (assignment_expression "param_2->__count = local_34.__count" (field_expression "param_2->__count" (identifier "param_2") (-> "->") (field_identifier "__count")) (= "=") (field_expression "local_34.__count" (identifier "local_34") (. ".") (field_identifier "__count"))) (; ";")) (expression_statement "param_2->__value = local_34.__value;" (assignment_expression "param_2->__value = local_34.__value" (field_expression "param_2->__value" (identifier "param_2") (-> "->") (field_identifier "__value")) (= "=") (field_expression "local_34.__value" (identifier "local_34") (. ".") (field_identifier "__value"))) (; ";")) (expression_statement "param_3 = *param_5;" (assignment_expression "param_3 = *param_5" (identifier "param_3") (= "=") (pointer_expression "*param_5" (* "*") (identifier "param_5"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";"))) (labeled_statement "LAB_0027b0e0:\n  iVar6 = 0;" (statement_identifier "LAB_0027b0e0") (: ":") (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" (identifier "iVar6") (= "=") (number_literal "0")) (; ";"))) (expression_statement "param_3 = pwVar5;" (assignment_expression "param_3 = pwVar5" (identifier "param_3") (= "=") (identifier "pwVar5")) (; ";")) (goto_statement "goto joined_r0x0027afb1;" (goto "goto") (statement_identifier "joined_r0x0027afb1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::codecvt<wchar_t, char, __mbstate_t>::do_out(__mbstate_t&, wchar_t const*, wchar_t const*,
   wchar_t const*&, char*, char*, char*&) const */

int __thiscall
std::codecvt<type_1,char,__mbstate_t>::do_out
          (codecvt<type_1,char,__mbstate_t> *var_2,__mbstate_t *param_1,type_1 *var_4,
          type_1 *var_3,type_1 **param_4,char *param_5,char *var_5,char **param_7)

{
  type_3 uVar1;
  type_1 *var_9;
  char *var_6;
  type_1 *var_12;
  int var_7;
  size_t var_11;
  type_2 local_34;
  char local_2c [24];
  type_3 uStack_14;
  
  var_7 = 0;
  uStack_14 = 0x27af6b;
  local_34.__value = param_1->__value;
  local_34.__count = param_1->__count;
  uVar1 = var_1(*(type_3 *)(var_2 + 8));
  *param_4 = var_4;
  *param_7 = param_5;
joined_r0x0027afb1:
  do {
    if (((var_3 <= var_4) || (var_6 = *param_7, var_5 <= var_6)) || (var_7 != 0)) {
LAB_0027b059:
      var_1(uVar1);
      return var_7;
    }
    while( true ) {
      var_11 = (int)var_3 - (int)var_4 >> 2;
      var_9 = var_8(var_4,L'\0',var_11);
      var_12 = var_3;
      if (var_9 != (type_1 *)0x0) {
        var_11 = (int)var_9 - (int)var_4 >> 2;
        var_12 = var_9;
      }
      var_11 = var_10(var_6,param_4,var_11,(int)var_5 - (int)var_6,param_1);
      if (var_11 == 0xffffffff) break;
      var_4 = *param_4;
      var_6 = *param_7;
      if ((var_4 != (type_1 *)0x0) && (var_4 < var_12)) {
        *param_7 = var_6 + var_11;
        var_7 = 1;
        goto joined_r0x0027afb1;
      }
      *param_4 = var_12;
      *param_7 = var_6 + var_11;
      if (var_3 <= var_12) goto LAB_0027b0e0;
      local_34.__value = param_1->__value;
      local_34.__count = param_1->__count;
      var_11 = var_13(local_2c,*var_12,&local_34);
      if ((uint)((int)var_5 - (int)*param_7) < var_11) {
        var_7 = 1;
        goto LAB_0027b059;
      }
      var_14(*param_7,local_2c,var_11);
      param_1->__count = local_34.__count;
      param_1->__value = local_34.__value;
      var_6 = *param_7 + var_11;
      *param_7 = var_6;
      var_4 = *param_4 + 1;
      *param_4 = var_4;
      if ((var_3 <= var_4) || (var_5 <= var_6)) {
        var_7 = 0;
        goto LAB_0027b059;
      }
    }
    if (var_4 < *param_4) {
      var_6 = *param_7;
      do {
        var_12 = var_4 + 1;
        var_11 = var_13(var_6,*var_4,&local_34);
        var_6 = *param_7 + var_11;
        *param_7 = var_6;
        var_4 = var_12;
      } while (var_12 < *param_4);
    }
    var_7 = 2;
    param_1->__count = local_34.__count;
    param_1->__value = local_34.__value;
    var_4 = *param_4;
  } while( true );
LAB_0027b0e0:
  var_7 = 0;
  var_4 = var_12;
  goto joined_r0x0027afb1;
}


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

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

int MASKED(int param_1,mbstate_t *param_2,wchar_t *param_3,wchar_t *param_4,wchar_t **param_5,
                uint param_6,char *param_7,uint *param_8)

{
  uint uVar1;
  undefined4 uVar2;
  wchar_t *pwVar3;
  char *pcVar4;
  wchar_t *pwVar5;
  int iVar6;
  size_t sVar7;
  mbstate_t local_34;
  char local_2c [24];
  undefined4 uStack_14;
  
  iVar6 = 0;
  uStack_14 = 0x27af6b;
  local_34.__value = param_2->__value;
  local_34.__count = param_2->__count;
  uVar2 = __uselocale(*(undefined4 *)(param_1 + 8));
  *param_5 = param_3;
  *param_8 = param_6;
joined_r0x0027afb1:
  do {
    if (((param_4 <= param_3) || (pcVar4 = (char *)*param_8, param_7 <= pcVar4)) || (iVar6 != 0)) {
LAB_0027b059:
      __uselocale(uVar2);
      return iVar6;
    }
    while( true ) {
      sVar7 = (int)param_4 - (int)param_3 >> 2;
      pwVar3 = wmemchr(param_3,L'\0',sVar7);
      pwVar5 = param_4;
      if (pwVar3 != (wchar_t *)0x0) {
        sVar7 = (int)pwVar3 - (int)param_3 >> 2;
        pwVar5 = pwVar3;
      }
      sVar7 = wcsnrtombs(pcVar4,param_5,sVar7,(int)param_7 - (int)pcVar4,param_2);
      if (sVar7 == 0xffffffff) break;
      param_3 = *param_5;
      uVar1 = *param_8;
      if ((param_3 != (wchar_t *)0x0) && (param_3 < pwVar5)) {
        *param_8 = sVar7 + uVar1;
        iVar6 = 1;
        goto joined_r0x0027afb1;
      }
      *param_5 = pwVar5;
      *param_8 = sVar7 + uVar1;
      if (param_4 <= pwVar5) goto LAB_0027b0e0;
      local_34.__value = param_2->__value;
      local_34.__count = param_2->__count;
      sVar7 = wcrtomb(local_2c,*pwVar5,&local_34);
      if ((uint)((int)param_7 - (int)*param_8) < sVar7) {
        iVar6 = 1;
        goto LAB_0027b059;
      }
      memcpy((void *)*param_8,local_2c,sVar7);
      param_2->__count = local_34.__count;
      param_2->__value = local_34.__value;
      pcVar4 = (char *)(*param_8 + sVar7);
      *param_8 = (uint)pcVar4;
      param_3 = *param_5 + 1;
      *param_5 = param_3;
      if ((param_4 <= param_3) || (param_7 <= pcVar4)) {
        iVar6 = 0;
        goto LAB_0027b059;
      }
    }
    if (param_3 < *param_5) {
      pcVar4 = (char *)*param_8;
      do {
        pwVar5 = param_3 + 1;
        sVar7 = wcrtomb(pcVar4,*param_3,&local_34);
        pcVar4 = (char *)(sVar7 + *param_8);
        *param_8 = (uint)pcVar4;
        param_3 = pwVar5;
      } while (pwVar5 < *param_5);
    }
    iVar6 = 2;
    param_2->__count = local_34.__count;
    param_2->__value = local_34.__value;
    param_3 = *param_5;
  } while( true );
LAB_0027b0e0:
  iVar6 = 0;
  param_3 = pwVar5;
  goto joined_r0x0027afb1;
}

