
/* std::codecvt<wchar_t, char, __mbstate_t>::do_length(__mbstate_t&, char const*, char const*,
   unsigned long) const */

int __thiscall
std::codecvt<wchar_t,char,__mbstate_t>::do_length
          (codecvt<wchar_t,char,__mbstate_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,
          ulong param_4)

{
  long lVar1;
  undefined8 uVar2;
  char **__src;
  wchar_t *__dst;
  __mbstate_t *__ps;
  char *__s;
  char *pcVar3;
  size_t sVar4;
  int iVar5;
  size_t sVar6;
  undefined8 auStack_80 [2];
  char **local_70;
  wchar_t *local_68;
  __mbstate_t *local_60;
  char *local_58;
  char *local_50 [2];
  __mbstate_t local_40 [2];
  
  iVar5 = 0;
  local_40[0] = *param_1;
  auStack_80[0] = 0x3c3b02;
  local_60 = param_1;
  local_50[0] = param_2;
  auStack_80[1] = __uselocale(*(undefined8 *)(this + 0x10));
  lVar1 = -(param_4 * 4 + 0x17 & 0xfffffffffffffff0);
  local_68 = (wchar_t *)((long)&local_70 + lVar1);
  local_70 = local_50;
  while (local_50[0] < param_3) {
    while( true ) {
      __s = local_50[0];
      if (param_4 == 0) goto LAB_003c3bda;
      sVar6 = (long)param_3 - (long)local_50[0];
      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;
      pcVar3 = (char *)memchr(__s,0,sVar6);
      __ps = local_60;
      __dst = local_68;
      __src = local_70;
      local_58 = param_3;
      if (pcVar3 != (char *)0x0) {
        sVar6 = (long)pcVar3 - (long)__s;
        local_58 = pcVar3;
      }
      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;
      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_4,__ps);
      if (sVar4 == 0xffffffffffffffff) {
        pcVar3 = __s;
        while( true ) {
          local_50[0] = pcVar3;
          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;
          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_3 - (long)pcVar3,local_40);
          if (sVar6 + 2 < 2) break;
          pcVar3 = local_50[0] + sVar6;
        }
        *local_60 = local_40[0];
        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;
        goto LAB_003c3bda;
      }
      pcVar3 = local_58;
      if (local_50[0] != (char *)0x0) {
        sVar6 = (long)local_50[0] - (long)__s;
        pcVar3 = local_50[0];
      }
      local_50[0] = pcVar3;
      iVar5 = iVar5 + (int)sVar6;
      param_4 = param_4 - sVar4;
      if ((param_3 <= local_50[0]) || (param_4 == 0)) break;
      local_50[0] = local_50[0] + 1;
      iVar5 = iVar5 + 1;
      param_4 = param_4 - 1;
      local_40[0] = *local_60;
      if (param_3 <= local_50[0]) goto LAB_003c3bda;
    }
  }
LAB_003c3bda:
  uVar2 = auStack_80[1];
  *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3;
  __uselocale(uVar2);
  return iVar5;
}



int FUN_003c3ad0(long param_1,mbstate_t *param_2,char *param_3,char *param_4,size_t param_5)

{
  long lVar1;
  undefined8 uVar2;
  char **__src;
  wchar_t *__dst;
  mbstate_t *__ps;
  char *__s;
  char *pcVar3;
  size_t sVar4;
  int iVar5;
  size_t sVar6;
  undefined8 auStack_80 [2];
  char **local_70;
  wchar_t *local_68;
  mbstate_t *local_60;
  char *local_58;
  char *local_50 [2];
  mbstate_t local_40 [2];
  
  iVar5 = 0;
  local_40[0] = *param_2;
  auStack_80[0] = 0x3c3b02;
  local_60 = param_2;
  local_50[0] = param_3;
  auStack_80[1] = __uselocale(*(undefined8 *)(param_1 + 0x10));
  lVar1 = -(param_5 * 4 + 0x17 & 0xfffffffffffffff0);
  local_68 = (wchar_t *)((long)&local_70 + lVar1);
  local_70 = local_50;
  while (local_50[0] < param_4) {
    while( true ) {
      __s = local_50[0];
      if (param_5 == 0) goto LAB_003c3bda;
      sVar6 = (long)param_4 - (long)local_50[0];
      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;
      pcVar3 = (char *)memchr(__s,0,sVar6);
      __ps = local_60;
      __dst = local_68;
      __src = local_70;
      local_58 = param_4;
      if (pcVar3 != (char *)0x0) {
        sVar6 = (long)pcVar3 - (long)__s;
        local_58 = pcVar3;
      }
      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;
      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);
      if (sVar4 == 0xffffffffffffffff) {
        pcVar3 = __s;
        while( true ) {
          local_50[0] = pcVar3;
          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;
          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);
          if (sVar6 + 2 < 2) break;
          pcVar3 = local_50[0] + sVar6;
        }
        *local_60 = local_40[0];
        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;
        goto LAB_003c3bda;
      }
      pcVar3 = local_58;
      if (local_50[0] != (char *)0x0) {
        sVar6 = (long)local_50[0] - (long)__s;
        pcVar3 = local_50[0];
      }
      local_50[0] = pcVar3;
      iVar5 = iVar5 + (int)sVar6;
      param_5 = param_5 - sVar4;
      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;
      local_50[0] = local_50[0] + 1;
      iVar5 = iVar5 + 1;
      param_5 = param_5 - 1;
      local_40[0] = *local_60;
      if (param_4 <= local_50[0]) goto LAB_003c3bda;
    }
  }
LAB_003c3bda:
  uVar2 = auStack_80[1];
  *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3;
  __uselocale(uVar2);
  return iVar5;
}


PUSH RBP
MOV RBP,RSP
PUSH R15
MOV R15,R8
PUSH R14
PUSH R13
XOR R13D,R13D
PUSH R12
MOV R12,RCX
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr [RSI]
MOV RDI,qword ptr [RDI + 0x10]
MOV qword ptr [RBP + -0x58],RSI
MOV qword ptr [RBP + -0x48],RDX
MOV qword ptr [RBP + -0x38],RAX
CALL 0x00150780
MOV RBX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x70],RAX
LEA RAX,[0x17 + R15*0x4]
AND RAX,-0x10
SUB RSP,RAX
LEA RAX,[RSP + 0xf]
AND RAX,-0x10
MOV qword ptr [RBP + -0x60],RAX
LEA RAX,[RBP + -0x48]
MOV qword ptr [RBP + -0x68],RAX
NOP
CMP R12,RBX
JBE 0x003c3bda
TEST R15,R15
JZ 0x003c3bda
MOV R14,R12
XOR ESI,ESI
MOV RDI,RBX
SUB R14,RBX
MOV RDX,R14
CALL 0x001501b0
MOV R11,RAX
TEST RAX,RAX
JZ 0x003c3bf8
MOV R14,RAX
SUB R14,RBX
MOV R8,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x68]
MOV RCX,R15
MOV RDX,R14
MOV RDI,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x50],R11
CALL 0x001502d0
MOV R11,qword ptr [RBP + -0x50]
CMP RAX,-0x1
JZ 0x003c3c10
MOV RDX,qword ptr [RBP + -0x48]
TEST RDX,RDX
JZ 0x003c3c00
MOV R14,RDX
SUB R14,RBX
MOV RBX,RDX
ADD R13D,R14D
SUB R15,RAX
CMP R12,RBX
JBE 0x003c3b30
TEST R15,R15
JZ 0x003c3b30
MOV RAX,qword ptr [RBP + -0x58]
ADD RBX,0x1
ADD R13D,0x1
SUB R15,0x1
MOV qword ptr [RBP + -0x48],RBX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP R12,RBX
JA 0x003c3b39
MOV RDI,qword ptr [RBP + -0x70]
CALL 0x00150780
LEA RSP,[RBP + -0x28]
MOV EAX,R13D
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
MOV R11,R12
JMP 0x003c3b67
MOV qword ptr [RBP + -0x48],R11
MOV RBX,R11
JMP 0x003c3ba2
MOV qword ptr [RBP + -0x48],RBX
MOV RSI,RBX
LEA R15,[RBP + -0x38]
JMP 0x003c3c2b
ADD RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
MOV RSI,RAX
MOV RDX,R12
MOV RCX,R15
XOR EDI,EDI
SUB RDX,RSI
CALL 0x00150120
LEA RDX,[RAX + 0x2]
CMP RDX,0x1
JA 0x003c3c20
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x58]
ADD R13D,dword ptr [RBP + -0x48]
MOV qword ptr [RCX],RAX
SUB R13D,EBX
JMP 0x003c3bda
(translation_unit "int FUN_003c3ad0(long param_1,mbstate_t *param_2,char *param_3,char *param_4,size_t param_5)\n\n{\n  long lVar1;\n  undefined8 uVar2;\n  char **__src;\n  wchar_t *__dst;\n  mbstate_t *__ps;\n  char *__s;\n  char *pcVar3;\n  size_t sVar4;\n  int iVar5;\n  size_t sVar6;\n  undefined8 auStack_80 [2];\n  char **local_70;\n  wchar_t *local_68;\n  mbstate_t *local_60;\n  char *local_58;\n  char *local_50 [2];\n  mbstate_t local_40 [2];\n  \n  iVar5 = 0;\n  local_40[0] = *param_2;\n  auStack_80[0] = 0x3c3b02;\n  local_60 = param_2;\n  local_50[0] = param_3;\n  auStack_80[1] = __uselocale(*(undefined8 *)(param_1 + 0x10));\n  lVar1 = -(param_5 * 4 + 0x17 & 0xfffffffffffffff0);\n  local_68 = (wchar_t *)((long)&local_70 + lVar1);\n  local_70 = local_50;\n  while (local_50[0] < param_4) {\n    while( true ) {\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }\n  }\nLAB_003c3bda:\n  uVar2 = auStack_80[1];\n  *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3;\n  __uselocale(uVar2);\n  return iVar5;\n}\n\n" (function_definition "int FUN_003c3ad0(long param_1,mbstate_t *param_2,char *param_3,char *param_4,size_t param_5)\n\n{\n  long lVar1;\n  undefined8 uVar2;\n  char **__src;\n  wchar_t *__dst;\n  mbstate_t *__ps;\n  char *__s;\n  char *pcVar3;\n  size_t sVar4;\n  int iVar5;\n  size_t sVar6;\n  undefined8 auStack_80 [2];\n  char **local_70;\n  wchar_t *local_68;\n  mbstate_t *local_60;\n  char *local_58;\n  char *local_50 [2];\n  mbstate_t local_40 [2];\n  \n  iVar5 = 0;\n  local_40[0] = *param_2;\n  auStack_80[0] = 0x3c3b02;\n  local_60 = param_2;\n  local_50[0] = param_3;\n  auStack_80[1] = __uselocale(*(undefined8 *)(param_1 + 0x10));\n  lVar1 = -(param_5 * 4 + 0x17 & 0xfffffffffffffff0);\n  local_68 = (wchar_t *)((long)&local_70 + lVar1);\n  local_70 = local_50;\n  while (local_50[0] < param_4) {\n    while( true ) {\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }\n  }\nLAB_003c3bda:\n  uVar2 = auStack_80[1];\n  *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3;\n  __uselocale(uVar2);\n  return iVar5;\n}" primitive_type (function_declarator "FUN_003c3ad0(long param_1,mbstate_t *param_2,char *param_3,char *param_4,size_t param_5)" identifier (parameter_list "(long param_1,mbstate_t *param_2,char *param_3,char *param_4,size_t param_5)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "mbstate_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "char *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "size_t param_5" primitive_type identifier) ))) (compound_statement "{\n  long lVar1;\n  undefined8 uVar2;\n  char **__src;\n  wchar_t *__dst;\n  mbstate_t *__ps;\n  char *__s;\n  char *pcVar3;\n  size_t sVar4;\n  int iVar5;\n  size_t sVar6;\n  undefined8 auStack_80 [2];\n  char **local_70;\n  wchar_t *local_68;\n  mbstate_t *local_60;\n  char *local_58;\n  char *local_50 [2];\n  mbstate_t local_40 [2];\n  \n  iVar5 = 0;\n  local_40[0] = *param_2;\n  auStack_80[0] = 0x3c3b02;\n  local_60 = param_2;\n  local_50[0] = param_3;\n  auStack_80[1] = __uselocale(*(undefined8 *)(param_1 + 0x10));\n  lVar1 = -(param_5 * 4 + 0x17 & 0xfffffffffffffff0);\n  local_68 = (wchar_t *)((long)&local_70 + lVar1);\n  local_70 = local_50;\n  while (local_50[0] < param_4) {\n    while( true ) {\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }\n  }\nLAB_003c3bda:\n  uVar2 = auStack_80[1];\n  *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3;\n  __uselocale(uVar2);\n  return iVar5;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "char **__src;" primitive_type (pointer_declarator "**__src" * (pointer_declarator "*__src" * identifier)) ;) (declaration "wchar_t *__dst;" type_identifier (pointer_declarator "*__dst" * identifier) ;) (declaration "mbstate_t *__ps;" type_identifier (pointer_declarator "*__ps" * identifier) ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "undefined8 auStack_80 [2];" type_identifier (array_declarator "auStack_80 [2]" identifier [ number_literal ]) ;) (declaration "char **local_70;" primitive_type (pointer_declarator "**local_70" * (pointer_declarator "*local_70" * identifier)) ;) (declaration "wchar_t *local_68;" type_identifier (pointer_declarator "*local_68" * identifier) ;) (declaration "mbstate_t *local_60;" type_identifier (pointer_declarator "*local_60" * identifier) ;) (declaration "char *local_58;" primitive_type (pointer_declarator "*local_58" * identifier) ;) (declaration "char *local_50 [2];" primitive_type (pointer_declarator "*local_50 [2]" * (array_declarator "local_50 [2]" identifier [ number_literal ])) ;) (declaration "mbstate_t local_40 [2];" type_identifier (array_declarator "local_40 [2]" identifier [ number_literal ]) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "local_40[0] = *param_2;" (assignment_expression "local_40[0] = *param_2" (subscript_expression "local_40[0]" identifier [ number_literal ]) = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "auStack_80[0] = 0x3c3b02;" (assignment_expression "auStack_80[0] = 0x3c3b02" (subscript_expression "auStack_80[0]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "local_60 = param_2;" (assignment_expression "local_60 = param_2" identifier = identifier) ;) (expression_statement "local_50[0] = param_3;" (assignment_expression "local_50[0] = param_3" (subscript_expression "local_50[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "auStack_80[1] = __uselocale(*(undefined8 *)(param_1 + 0x10));" (assignment_expression "auStack_80[1] = __uselocale(*(undefined8 *)(param_1 + 0x10))" (subscript_expression "auStack_80[1]" identifier [ number_literal ]) = (call_expression "__uselocale(*(undefined8 *)(param_1 + 0x10))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x10))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x10)" * (cast_expression "(undefined8 *)(param_1 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) )))) ;) (expression_statement "lVar1 = -(param_5 * 4 + 0x17 & 0xfffffffffffffff0);" (assignment_expression "lVar1 = -(param_5 * 4 + 0x17 & 0xfffffffffffffff0)" identifier = (unary_expression "-(param_5 * 4 + 0x17 & 0xfffffffffffffff0)" - (parenthesized_expression "(param_5 * 4 + 0x17 & 0xfffffffffffffff0)" ( (binary_expression "param_5 * 4 + 0x17 & 0xfffffffffffffff0" (binary_expression "param_5 * 4 + 0x17" (binary_expression "param_5 * 4" identifier * number_literal) + number_literal) & number_literal) )))) ;) (expression_statement "local_68 = (wchar_t *)((long)&local_70 + lVar1);" (assignment_expression "local_68 = (wchar_t *)((long)&local_70 + lVar1)" identifier = (cast_expression "(wchar_t *)((long)&local_70 + lVar1)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)&local_70 + lVar1)" ( (binary_expression "(long)&local_70 + lVar1" (cast_expression "(long)&local_70" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "&local_70" & identifier)) + identifier) )))) ;) (expression_statement "local_70 = local_50;" (assignment_expression "local_70 = local_50" identifier = identifier) ;) (while_statement "while (local_50[0] < param_4) {\n    while( true ) {\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }\n  }" while (parenthesized_expression "(local_50[0] < param_4)" ( (binary_expression "local_50[0] < param_4" (subscript_expression "local_50[0]" identifier [ number_literal ]) < identifier) )) (compound_statement "{\n    while( true ) {\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }\n  }" { (while_statement "while( true ) {\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }" { (expression_statement "__s = local_50[0];" (assignment_expression "__s = local_50[0]" identifier = (subscript_expression "local_50[0]" identifier [ number_literal ])) ;) (if_statement "if (param_5 == 0) goto LAB_003c3bda;" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (goto_statement "goto LAB_003c3bda;" goto statement_identifier ;)) (expression_statement "sVar6 = (long)param_4 - (long)local_50[0];" (assignment_expression "sVar6 = (long)param_4 - (long)local_50[0]" identifier = (binary_expression "(long)param_4 - (long)local_50[0]" (cast_expression "(long)param_4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)local_50[0]" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (subscript_expression "local_50[0]" identifier [ number_literal ])))) ;) (expression_statement "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;" (assignment_expression "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55" (pointer_expression "*(undefined8 *)((long)auStack_80 + lVar1)" * (cast_expression "(undefined8 *)((long)auStack_80 + lVar1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)auStack_80 + lVar1)" ( (binary_expression "(long)auStack_80 + lVar1" (cast_expression "(long)auStack_80" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "pcVar3 = (char *)memchr(__s,0,sVar6);" (assignment_expression "pcVar3 = (char *)memchr(__s,0,sVar6)" identifier = (cast_expression "(char *)memchr(__s,0,sVar6)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "memchr(__s,0,sVar6)" identifier (argument_list "(__s,0,sVar6)" ( identifier , number_literal , identifier ))))) ;) (expression_statement "__ps = local_60;" (assignment_expression "__ps = local_60" identifier = identifier) ;) (expression_statement "__dst = local_68;" (assignment_expression "__dst = local_68" identifier = identifier) ;) (expression_statement "__src = local_70;" (assignment_expression "__src = local_70" identifier = identifier) ;) (expression_statement "local_58 = param_4;" (assignment_expression "local_58 = param_4" identifier = identifier) ;) (if_statement "if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }" { (expression_statement "sVar6 = (long)pcVar3 - (long)__s;" (assignment_expression "sVar6 = (long)pcVar3 - (long)__s" identifier = (binary_expression "(long)pcVar3 - (long)__s" (cast_expression "(long)pcVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)__s" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (expression_statement "local_58 = pcVar3;" (assignment_expression "local_58 = pcVar3" identifier = identifier) ;) })) (expression_statement "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;" (assignment_expression "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82" (pointer_expression "*(undefined8 *)((long)auStack_80 + lVar1)" * (cast_expression "(undefined8 *)((long)auStack_80 + lVar1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)auStack_80 + lVar1)" ( (binary_expression "(long)auStack_80 + lVar1" (cast_expression "(long)auStack_80" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);" (assignment_expression "sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps)" identifier = (call_expression "mbsnrtowcs(__dst,__src,sVar6,param_5,__ps)" identifier (argument_list "(__dst,__src,sVar6,param_5,__ps)" ( identifier , identifier , identifier , identifier , identifier )))) ;) (if_statement "if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }" if (parenthesized_expression "(sVar4 == 0xffffffffffffffff)" ( (binary_expression "sVar4 == 0xffffffffffffffff" identifier == number_literal) )) (compound_statement "{\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }" { (expression_statement "pcVar3 = __s;" (assignment_expression "pcVar3 = __s" identifier = identifier) ;) (while_statement "while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }" { (expression_statement "local_50[0] = pcVar3;" (assignment_expression "local_50[0] = pcVar3" (subscript_expression "local_50[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;" (assignment_expression "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b" (pointer_expression "*(undefined8 *)((long)auStack_80 + lVar1)" * (cast_expression "(undefined8 *)((long)auStack_80 + lVar1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)auStack_80 + lVar1)" ( (binary_expression "(long)auStack_80 + lVar1" (cast_expression "(long)auStack_80" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);" (assignment_expression "sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40)" identifier = (call_expression "mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40)" identifier (argument_list "((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40)" ( (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , identifier , (binary_expression "(long)param_4 - (long)pcVar3" (cast_expression "(long)param_4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)pcVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) , identifier )))) ;) (if_statement "if (sVar6 + 2 < 2) break;" if (parenthesized_expression "(sVar6 + 2 < 2)" ( (binary_expression "sVar6 + 2 < 2" (binary_expression "sVar6 + 2" identifier + number_literal) < number_literal) )) (break_statement "break;" break ;)) (expression_statement "pcVar3 = local_50[0] + sVar6;" (assignment_expression "pcVar3 = local_50[0] + sVar6" identifier = (binary_expression "local_50[0] + sVar6" (subscript_expression "local_50[0]" identifier [ number_literal ]) + identifier)) ;) })) (expression_statement "*local_60 = local_40[0];" (assignment_expression "*local_60 = local_40[0]" (pointer_expression "*local_60" * identifier) = (subscript_expression "local_40[0]" identifier [ number_literal ])) ;) (expression_statement "iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;" (assignment_expression "iVar5 = (iVar5 + (int)local_50[0]) - (int)__s" identifier = (binary_expression "(iVar5 + (int)local_50[0]) - (int)__s" (parenthesized_expression "(iVar5 + (int)local_50[0])" ( (binary_expression "iVar5 + (int)local_50[0]" identifier + (cast_expression "(int)local_50[0]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "local_50[0]" identifier [ number_literal ]))) )) - (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (goto_statement "goto LAB_003c3bda;" goto statement_identifier ;) })) (expression_statement "pcVar3 = local_58;" (assignment_expression "pcVar3 = local_58" identifier = identifier) ;) (if_statement "if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }" if (parenthesized_expression "(local_50[0] != (char *)0x0)" ( (binary_expression "local_50[0] != (char *)0x0" (subscript_expression "local_50[0]" identifier [ number_literal ]) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }" { (expression_statement "sVar6 = (long)local_50[0] - (long)__s;" (assignment_expression "sVar6 = (long)local_50[0] - (long)__s" identifier = (binary_expression "(long)local_50[0] - (long)__s" (cast_expression "(long)local_50[0]" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (subscript_expression "local_50[0]" identifier [ number_literal ])) - (cast_expression "(long)__s" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (expression_statement "pcVar3 = local_50[0];" (assignment_expression "pcVar3 = local_50[0]" identifier = (subscript_expression "local_50[0]" identifier [ number_literal ])) ;) })) (expression_statement "local_50[0] = pcVar3;" (assignment_expression "local_50[0] = pcVar3" (subscript_expression "local_50[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar5 = iVar5 + (int)sVar6;" (assignment_expression "iVar5 = iVar5 + (int)sVar6" identifier = (binary_expression "iVar5 + (int)sVar6" identifier + (cast_expression "(int)sVar6" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "param_5 = param_5 - sVar4;" (assignment_expression "param_5 = param_5 - sVar4" identifier = (binary_expression "param_5 - sVar4" identifier - identifier)) ;) (if_statement "if ((param_4 <= local_50[0]) || (param_5 == 0)) break;" if (parenthesized_expression "((param_4 <= local_50[0]) || (param_5 == 0))" ( (binary_expression "(param_4 <= local_50[0]) || (param_5 == 0)" (parenthesized_expression "(param_4 <= local_50[0])" ( (binary_expression "param_4 <= local_50[0]" identifier <= (subscript_expression "local_50[0]" identifier [ number_literal ])) )) || (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) ))) )) (break_statement "break;" break ;)) (expression_statement "local_50[0] = local_50[0] + 1;" (assignment_expression "local_50[0] = local_50[0] + 1" (subscript_expression "local_50[0]" identifier [ number_literal ]) = (binary_expression "local_50[0] + 1" (subscript_expression "local_50[0]" identifier [ number_literal ]) + number_literal)) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "param_5 = param_5 - 1;" (assignment_expression "param_5 = param_5 - 1" identifier = (binary_expression "param_5 - 1" identifier - number_literal)) ;) (expression_statement "local_40[0] = *local_60;" (assignment_expression "local_40[0] = *local_60" (subscript_expression "local_40[0]" identifier [ number_literal ]) = (pointer_expression "*local_60" * identifier)) ;) (if_statement "if (param_4 <= local_50[0]) goto LAB_003c3bda;" if (parenthesized_expression "(param_4 <= local_50[0])" ( (binary_expression "param_4 <= local_50[0]" identifier <= (subscript_expression "local_50[0]" identifier [ number_literal ])) )) (goto_statement "goto LAB_003c3bda;" goto statement_identifier ;)) })) })) (labeled_statement "LAB_003c3bda:\n  uVar2 = auStack_80[1];" statement_identifier : (expression_statement "uVar2 = auStack_80[1];" (assignment_expression "uVar2 = auStack_80[1]" identifier = (subscript_expression "auStack_80[1]" identifier [ number_literal ])) ;)) (expression_statement "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3;" (assignment_expression "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3" (pointer_expression "*(undefined8 *)((long)auStack_80 + lVar1)" * (cast_expression "(undefined8 *)((long)auStack_80 + lVar1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)auStack_80 + lVar1)" ( (binary_expression "(long)auStack_80 + lVar1" (cast_expression "(long)auStack_80" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "__uselocale(uVar2);" (call_expression "__uselocale(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return iVar5;" return identifier ;) })))
(translation_unit "/* std::codecvt<wchar_t, char, __mbstate_t>::do_length(__mbstate_t&, char const*, char const*,\n   unsigned long) const */\n\nint __thiscall\nstd::codecvt<wchar_t,char,__mbstate_t>::do_length\n          (codecvt<wchar_t,char,__mbstate_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          ulong param_4)\n\n{\n  long lVar1;\n  undefined8 uVar2;\n  char **__src;\n  wchar_t *__dst;\n  __mbstate_t *__ps;\n  char *__s;\n  char *pcVar3;\n  size_t sVar4;\n  int iVar5;\n  size_t sVar6;\n  undefined8 auStack_80 [2];\n  char **local_70;\n  wchar_t *local_68;\n  __mbstate_t *local_60;\n  char *local_58;\n  char *local_50 [2];\n  __mbstate_t local_40 [2];\n  \n  iVar5 = 0;\n  local_40[0] = *param_1;\n  auStack_80[0] = 0x3c3b02;\n  local_60 = param_1;\n  local_50[0] = param_2;\n  auStack_80[1] = __uselocale(*(undefined8 *)(this + 0x10));\n  lVar1 = -(param_4 * 4 + 0x17 & 0xfffffffffffffff0);\n  local_68 = (wchar_t *)((long)&local_70 + lVar1);\n  local_70 = local_50;\n  while (local_50[0] < param_3) {\n    while( true ) {\n      __s = local_50[0];\n      if (param_4 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_3 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_3;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_4,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_3 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_4 = param_4 - sVar4;\n      if ((param_3 <= local_50[0]) || (param_4 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_4 = param_4 - 1;\n      local_40[0] = *local_60;\n      if (param_3 <= local_50[0]) goto LAB_003c3bda;\n    }\n  }\nLAB_003c3bda:\n  uVar2 = auStack_80[1];\n  *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3;\n  __uselocale(uVar2);\n  return iVar5;\n}\n\n" comment (declaration "int __thiscall\nstd::codecvt<wchar_t,char,__mbstate_t>::do_length\n          (codecvt<wchar_t,char,__mbstate_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          ulong param_4)\n\n{\n  long lVar1;" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::codecvt<" identifier : : identifier <) identifier , identifier , (ERROR "__mbstate_t>::do_length\n          (codecvt<wchar_t,char,__mbstate_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          ulong param_4)\n\n{\n  long" (function_declarator "__mbstate_t>::do_length\n          (codecvt<wchar_t,char,__mbstate_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          ulong param_4)" identifier (ERROR ">::do_length" > : : identifier) (parameter_list "(codecvt<wchar_t,char,__mbstate_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          ulong param_4)" ( (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 "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "ulong param_4" type_identifier identifier) ))) { long) identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "char **__src;" primitive_type (pointer_declarator "**__src" * (pointer_declarator "*__src" * identifier)) ;) (declaration "wchar_t *__dst;" type_identifier (pointer_declarator "*__dst" * identifier) ;) (declaration "__mbstate_t *__ps;" type_identifier (pointer_declarator "*__ps" * identifier) ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "undefined8 auStack_80 [2];" type_identifier (array_declarator "auStack_80 [2]" identifier [ number_literal ]) ;) (declaration "char **local_70;" primitive_type (pointer_declarator "**local_70" * (pointer_declarator "*local_70" * identifier)) ;) (declaration "wchar_t *local_68;" type_identifier (pointer_declarator "*local_68" * identifier) ;) (declaration "__mbstate_t *local_60;" type_identifier (pointer_declarator "*local_60" * identifier) ;) (declaration "char *local_58;" primitive_type (pointer_declarator "*local_58" * identifier) ;) (declaration "char *local_50 [2];" primitive_type (pointer_declarator "*local_50 [2]" * (array_declarator "local_50 [2]" identifier [ number_literal ])) ;) (declaration "__mbstate_t local_40 [2];" type_identifier (array_declarator "local_40 [2]" identifier [ number_literal ]) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "local_40[0] = *param_1;" (assignment_expression "local_40[0] = *param_1" (subscript_expression "local_40[0]" identifier [ number_literal ]) = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "auStack_80[0] = 0x3c3b02;" (assignment_expression "auStack_80[0] = 0x3c3b02" (subscript_expression "auStack_80[0]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "local_60 = param_1;" (assignment_expression "local_60 = param_1" identifier = identifier) ;) (expression_statement "local_50[0] = param_2;" (assignment_expression "local_50[0] = param_2" (subscript_expression "local_50[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "auStack_80[1] = __uselocale(*(undefined8 *)(this + 0x10));" (assignment_expression "auStack_80[1] = __uselocale(*(undefined8 *)(this + 0x10))" (subscript_expression "auStack_80[1]" identifier [ number_literal ]) = (call_expression "__uselocale(*(undefined8 *)(this + 0x10))" identifier (argument_list "(*(undefined8 *)(this + 0x10))" ( (pointer_expression "*(undefined8 *)(this + 0x10)" * (cast_expression "(undefined8 *)(this + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) )))) ;) (expression_statement "lVar1 = -(param_4 * 4 + 0x17 & 0xfffffffffffffff0);" (assignment_expression "lVar1 = -(param_4 * 4 + 0x17 & 0xfffffffffffffff0)" identifier = (unary_expression "-(param_4 * 4 + 0x17 & 0xfffffffffffffff0)" - (parenthesized_expression "(param_4 * 4 + 0x17 & 0xfffffffffffffff0)" ( (binary_expression "param_4 * 4 + 0x17 & 0xfffffffffffffff0" (binary_expression "param_4 * 4 + 0x17" (binary_expression "param_4 * 4" identifier * number_literal) + number_literal) & number_literal) )))) ;) (expression_statement "local_68 = (wchar_t *)((long)&local_70 + lVar1);" (assignment_expression "local_68 = (wchar_t *)((long)&local_70 + lVar1)" identifier = (cast_expression "(wchar_t *)((long)&local_70 + lVar1)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)&local_70 + lVar1)" ( (binary_expression "(long)&local_70 + lVar1" (cast_expression "(long)&local_70" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "&local_70" & identifier)) + identifier) )))) ;) (expression_statement "local_70 = local_50;" (assignment_expression "local_70 = local_50" identifier = identifier) ;) (while_statement "while (local_50[0] < param_3) {\n    while( true ) {\n      __s = local_50[0];\n      if (param_4 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_3 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_3;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_4,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_3 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_4 = param_4 - sVar4;\n      if ((param_3 <= local_50[0]) || (param_4 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_4 = param_4 - 1;\n      local_40[0] = *local_60;\n      if (param_3 <= local_50[0]) goto LAB_003c3bda;\n    }\n  }" while (parenthesized_expression "(local_50[0] < param_3)" ( (binary_expression "local_50[0] < param_3" (subscript_expression "local_50[0]" identifier [ number_literal ]) < identifier) )) (compound_statement "{\n    while( true ) {\n      __s = local_50[0];\n      if (param_4 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_3 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_3;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_4,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_3 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_4 = param_4 - sVar4;\n      if ((param_3 <= local_50[0]) || (param_4 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_4 = param_4 - 1;\n      local_40[0] = *local_60;\n      if (param_3 <= local_50[0]) goto LAB_003c3bda;\n    }\n  }" { (while_statement "while( true ) {\n      __s = local_50[0];\n      if (param_4 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_3 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_3;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_4,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_3 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_4 = param_4 - sVar4;\n      if ((param_3 <= local_50[0]) || (param_4 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_4 = param_4 - 1;\n      local_40[0] = *local_60;\n      if (param_3 <= local_50[0]) goto LAB_003c3bda;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      __s = local_50[0];\n      if (param_4 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_3 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_3;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_4,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_3 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_4 = param_4 - sVar4;\n      if ((param_3 <= local_50[0]) || (param_4 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_4 = param_4 - 1;\n      local_40[0] = *local_60;\n      if (param_3 <= local_50[0]) goto LAB_003c3bda;\n    }" { (expression_statement "__s = local_50[0];" (assignment_expression "__s = local_50[0]" identifier = (subscript_expression "local_50[0]" identifier [ number_literal ])) ;) (if_statement "if (param_4 == 0) goto LAB_003c3bda;" if (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_003c3bda;" goto statement_identifier ;)) (expression_statement "sVar6 = (long)param_3 - (long)local_50[0];" (assignment_expression "sVar6 = (long)param_3 - (long)local_50[0]" identifier = (binary_expression "(long)param_3 - (long)local_50[0]" (cast_expression "(long)param_3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)local_50[0]" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (subscript_expression "local_50[0]" identifier [ number_literal ])))) ;) (expression_statement "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;" (assignment_expression "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55" (pointer_expression "*(undefined8 *)((long)auStack_80 + lVar1)" * (cast_expression "(undefined8 *)((long)auStack_80 + lVar1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)auStack_80 + lVar1)" ( (binary_expression "(long)auStack_80 + lVar1" (cast_expression "(long)auStack_80" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "pcVar3 = (char *)memchr(__s,0,sVar6);" (assignment_expression "pcVar3 = (char *)memchr(__s,0,sVar6)" identifier = (cast_expression "(char *)memchr(__s,0,sVar6)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "memchr(__s,0,sVar6)" identifier (argument_list "(__s,0,sVar6)" ( identifier , number_literal , identifier ))))) ;) (expression_statement "__ps = local_60;" (assignment_expression "__ps = local_60" identifier = identifier) ;) (expression_statement "__dst = local_68;" (assignment_expression "__dst = local_68" identifier = identifier) ;) (expression_statement "__src = local_70;" (assignment_expression "__src = local_70" identifier = identifier) ;) (expression_statement "local_58 = param_3;" (assignment_expression "local_58 = param_3" identifier = identifier) ;) (if_statement "if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }" { (expression_statement "sVar6 = (long)pcVar3 - (long)__s;" (assignment_expression "sVar6 = (long)pcVar3 - (long)__s" identifier = (binary_expression "(long)pcVar3 - (long)__s" (cast_expression "(long)pcVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)__s" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (expression_statement "local_58 = pcVar3;" (assignment_expression "local_58 = pcVar3" identifier = identifier) ;) })) (expression_statement "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;" (assignment_expression "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82" (pointer_expression "*(undefined8 *)((long)auStack_80 + lVar1)" * (cast_expression "(undefined8 *)((long)auStack_80 + lVar1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)auStack_80 + lVar1)" ( (binary_expression "(long)auStack_80 + lVar1" (cast_expression "(long)auStack_80" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_4,__ps);" (assignment_expression "sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_4,__ps)" identifier = (call_expression "mbsnrtowcs(__dst,__src,sVar6,param_4,__ps)" identifier (argument_list "(__dst,__src,sVar6,param_4,__ps)" ( identifier , identifier , identifier , identifier , identifier )))) ;) (if_statement "if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_3 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }" if (parenthesized_expression "(sVar4 == 0xffffffffffffffff)" ( (binary_expression "sVar4 == 0xffffffffffffffff" identifier == number_literal) )) (compound_statement "{\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_3 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }" { (expression_statement "pcVar3 = __s;" (assignment_expression "pcVar3 = __s" identifier = identifier) ;) (while_statement "while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_3 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_3 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }" { (expression_statement "local_50[0] = pcVar3;" (assignment_expression "local_50[0] = pcVar3" (subscript_expression "local_50[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;" (assignment_expression "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b" (pointer_expression "*(undefined8 *)((long)auStack_80 + lVar1)" * (cast_expression "(undefined8 *)((long)auStack_80 + lVar1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)auStack_80 + lVar1)" ( (binary_expression "(long)auStack_80 + lVar1" (cast_expression "(long)auStack_80" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_3 - (long)pcVar3,local_40);" (assignment_expression "sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_3 - (long)pcVar3,local_40)" identifier = (call_expression "mbrtowc((wchar_t *)0x0,pcVar3,(long)param_3 - (long)pcVar3,local_40)" identifier (argument_list "((wchar_t *)0x0,pcVar3,(long)param_3 - (long)pcVar3,local_40)" ( (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , identifier , (binary_expression "(long)param_3 - (long)pcVar3" (cast_expression "(long)param_3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)pcVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) , identifier )))) ;) (if_statement "if (sVar6 + 2 < 2) break;" if (parenthesized_expression "(sVar6 + 2 < 2)" ( (binary_expression "sVar6 + 2 < 2" (binary_expression "sVar6 + 2" identifier + number_literal) < number_literal) )) (break_statement "break;" break ;)) (expression_statement "pcVar3 = local_50[0] + sVar6;" (assignment_expression "pcVar3 = local_50[0] + sVar6" identifier = (binary_expression "local_50[0] + sVar6" (subscript_expression "local_50[0]" identifier [ number_literal ]) + identifier)) ;) })) (expression_statement "*local_60 = local_40[0];" (assignment_expression "*local_60 = local_40[0]" (pointer_expression "*local_60" * identifier) = (subscript_expression "local_40[0]" identifier [ number_literal ])) ;) (expression_statement "iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;" (assignment_expression "iVar5 = (iVar5 + (int)local_50[0]) - (int)__s" identifier = (binary_expression "(iVar5 + (int)local_50[0]) - (int)__s" (parenthesized_expression "(iVar5 + (int)local_50[0])" ( (binary_expression "iVar5 + (int)local_50[0]" identifier + (cast_expression "(int)local_50[0]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "local_50[0]" identifier [ number_literal ]))) )) - (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (goto_statement "goto LAB_003c3bda;" goto statement_identifier ;) })) (expression_statement "pcVar3 = local_58;" (assignment_expression "pcVar3 = local_58" identifier = identifier) ;) (if_statement "if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }" if (parenthesized_expression "(local_50[0] != (char *)0x0)" ( (binary_expression "local_50[0] != (char *)0x0" (subscript_expression "local_50[0]" identifier [ number_literal ]) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }" { (expression_statement "sVar6 = (long)local_50[0] - (long)__s;" (assignment_expression "sVar6 = (long)local_50[0] - (long)__s" identifier = (binary_expression "(long)local_50[0] - (long)__s" (cast_expression "(long)local_50[0]" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (subscript_expression "local_50[0]" identifier [ number_literal ])) - (cast_expression "(long)__s" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (expression_statement "pcVar3 = local_50[0];" (assignment_expression "pcVar3 = local_50[0]" identifier = (subscript_expression "local_50[0]" identifier [ number_literal ])) ;) })) (expression_statement "local_50[0] = pcVar3;" (assignment_expression "local_50[0] = pcVar3" (subscript_expression "local_50[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar5 = iVar5 + (int)sVar6;" (assignment_expression "iVar5 = iVar5 + (int)sVar6" identifier = (binary_expression "iVar5 + (int)sVar6" identifier + (cast_expression "(int)sVar6" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "param_4 = param_4 - sVar4;" (assignment_expression "param_4 = param_4 - sVar4" identifier = (binary_expression "param_4 - sVar4" identifier - identifier)) ;) (if_statement "if ((param_3 <= local_50[0]) || (param_4 == 0)) break;" if (parenthesized_expression "((param_3 <= local_50[0]) || (param_4 == 0))" ( (binary_expression "(param_3 <= local_50[0]) || (param_4 == 0)" (parenthesized_expression "(param_3 <= local_50[0])" ( (binary_expression "param_3 <= local_50[0]" identifier <= (subscript_expression "local_50[0]" identifier [ number_literal ])) )) || (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) ))) )) (break_statement "break;" break ;)) (expression_statement "local_50[0] = local_50[0] + 1;" (assignment_expression "local_50[0] = local_50[0] + 1" (subscript_expression "local_50[0]" identifier [ number_literal ]) = (binary_expression "local_50[0] + 1" (subscript_expression "local_50[0]" identifier [ number_literal ]) + number_literal)) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "param_4 = param_4 - 1;" (assignment_expression "param_4 = param_4 - 1" identifier = (binary_expression "param_4 - 1" identifier - number_literal)) ;) (expression_statement "local_40[0] = *local_60;" (assignment_expression "local_40[0] = *local_60" (subscript_expression "local_40[0]" identifier [ number_literal ]) = (pointer_expression "*local_60" * identifier)) ;) (if_statement "if (param_3 <= local_50[0]) goto LAB_003c3bda;" if (parenthesized_expression "(param_3 <= local_50[0])" ( (binary_expression "param_3 <= local_50[0]" identifier <= (subscript_expression "local_50[0]" identifier [ number_literal ])) )) (goto_statement "goto LAB_003c3bda;" goto statement_identifier ;)) })) })) (labeled_statement "LAB_003c3bda:\n  uVar2 = auStack_80[1];" statement_identifier : (expression_statement "uVar2 = auStack_80[1];" (assignment_expression "uVar2 = auStack_80[1]" identifier = (subscript_expression "auStack_80[1]" identifier [ number_literal ])) ;)) (expression_statement "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3;" (assignment_expression "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3" (pointer_expression "*(undefined8 *)((long)auStack_80 + lVar1)" * (cast_expression "(undefined8 *)((long)auStack_80 + lVar1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)auStack_80 + lVar1)" ( (binary_expression "(long)auStack_80 + lVar1" (cast_expression "(long)auStack_80" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "__uselocale(uVar2);" (call_expression "__uselocale(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return iVar5;" return identifier ;) (ERROR "}" }))
(translation_unit "int FUN_003c3ad0(long param_1,mbstate_t *param_2,char *param_3,char *param_4,size_t param_5)\n\n{\n  long lVar1;\n  undefined8 uVar2;\n  char **__src;\n  wchar_t *__dst;\n  mbstate_t *__ps;\n  char *__s;\n  char *pcVar3;\n  size_t sVar4;\n  int iVar5;\n  size_t sVar6;\n  undefined8 auStack_80 [2];\n  char **local_70;\n  wchar_t *local_68;\n  mbstate_t *local_60;\n  char *local_58;\n  char *local_50 [2];\n  mbstate_t local_40 [2];\n  \n  iVar5 = 0;\n  local_40[0] = *param_2;\n  auStack_80[0] = 0x3c3b02;\n  local_60 = param_2;\n  local_50[0] = param_3;\n  auStack_80[1] = __uselocale(*(undefined8 *)(param_1 + 0x10));\n  lVar1 = -(param_5 * 4 + 0x17 & 0xfffffffffffffff0);\n  local_68 = (wchar_t *)((long)&local_70 + lVar1);\n  local_70 = local_50;\n  while (local_50[0] < param_4) {\n    while( true ) {\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }\n  }\nLAB_003c3bda:\n  uVar2 = auStack_80[1];\n  *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3;\n  __uselocale(uVar2);\n  return iVar5;\n}\n\n" (function_definition "int FUN_003c3ad0(long param_1,mbstate_t *param_2,char *param_3,char *param_4,size_t param_5)\n\n{\n  long lVar1;\n  undefined8 uVar2;\n  char **__src;\n  wchar_t *__dst;\n  mbstate_t *__ps;\n  char *__s;\n  char *pcVar3;\n  size_t sVar4;\n  int iVar5;\n  size_t sVar6;\n  undefined8 auStack_80 [2];\n  char **local_70;\n  wchar_t *local_68;\n  mbstate_t *local_60;\n  char *local_58;\n  char *local_50 [2];\n  mbstate_t local_40 [2];\n  \n  iVar5 = 0;\n  local_40[0] = *param_2;\n  auStack_80[0] = 0x3c3b02;\n  local_60 = param_2;\n  local_50[0] = param_3;\n  auStack_80[1] = __uselocale(*(undefined8 *)(param_1 + 0x10));\n  lVar1 = -(param_5 * 4 + 0x17 & 0xfffffffffffffff0);\n  local_68 = (wchar_t *)((long)&local_70 + lVar1);\n  local_70 = local_50;\n  while (local_50[0] < param_4) {\n    while( true ) {\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }\n  }\nLAB_003c3bda:\n  uVar2 = auStack_80[1];\n  *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3;\n  __uselocale(uVar2);\n  return iVar5;\n}" primitive_type (function_declarator "FUN_003c3ad0(long param_1,mbstate_t *param_2,char *param_3,char *param_4,size_t param_5)" identifier (parameter_list "(long param_1,mbstate_t *param_2,char *param_3,char *param_4,size_t param_5)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "mbstate_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "char *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "size_t param_5" primitive_type identifier) ))) (compound_statement "{\n  long lVar1;\n  undefined8 uVar2;\n  char **__src;\n  wchar_t *__dst;\n  mbstate_t *__ps;\n  char *__s;\n  char *pcVar3;\n  size_t sVar4;\n  int iVar5;\n  size_t sVar6;\n  undefined8 auStack_80 [2];\n  char **local_70;\n  wchar_t *local_68;\n  mbstate_t *local_60;\n  char *local_58;\n  char *local_50 [2];\n  mbstate_t local_40 [2];\n  \n  iVar5 = 0;\n  local_40[0] = *param_2;\n  auStack_80[0] = 0x3c3b02;\n  local_60 = param_2;\n  local_50[0] = param_3;\n  auStack_80[1] = __uselocale(*(undefined8 *)(param_1 + 0x10));\n  lVar1 = -(param_5 * 4 + 0x17 & 0xfffffffffffffff0);\n  local_68 = (wchar_t *)((long)&local_70 + lVar1);\n  local_70 = local_50;\n  while (local_50[0] < param_4) {\n    while( true ) {\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }\n  }\nLAB_003c3bda:\n  uVar2 = auStack_80[1];\n  *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3;\n  __uselocale(uVar2);\n  return iVar5;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "char **__src;" primitive_type (pointer_declarator "**__src" * (pointer_declarator "*__src" * identifier)) ;) (declaration "wchar_t *__dst;" type_identifier (pointer_declarator "*__dst" * identifier) ;) (declaration "mbstate_t *__ps;" type_identifier (pointer_declarator "*__ps" * identifier) ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "undefined8 auStack_80 [2];" type_identifier (array_declarator "auStack_80 [2]" identifier [ number_literal ]) ;) (declaration "char **local_70;" primitive_type (pointer_declarator "**local_70" * (pointer_declarator "*local_70" * identifier)) ;) (declaration "wchar_t *local_68;" type_identifier (pointer_declarator "*local_68" * identifier) ;) (declaration "mbstate_t *local_60;" type_identifier (pointer_declarator "*local_60" * identifier) ;) (declaration "char *local_58;" primitive_type (pointer_declarator "*local_58" * identifier) ;) (declaration "char *local_50 [2];" primitive_type (pointer_declarator "*local_50 [2]" * (array_declarator "local_50 [2]" identifier [ number_literal ])) ;) (declaration "mbstate_t local_40 [2];" type_identifier (array_declarator "local_40 [2]" identifier [ number_literal ]) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "local_40[0] = *param_2;" (assignment_expression "local_40[0] = *param_2" (subscript_expression "local_40[0]" identifier [ number_literal ]) = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "auStack_80[0] = 0x3c3b02;" (assignment_expression "auStack_80[0] = 0x3c3b02" (subscript_expression "auStack_80[0]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "local_60 = param_2;" (assignment_expression "local_60 = param_2" identifier = identifier) ;) (expression_statement "local_50[0] = param_3;" (assignment_expression "local_50[0] = param_3" (subscript_expression "local_50[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "auStack_80[1] = __uselocale(*(undefined8 *)(param_1 + 0x10));" (assignment_expression "auStack_80[1] = __uselocale(*(undefined8 *)(param_1 + 0x10))" (subscript_expression "auStack_80[1]" identifier [ number_literal ]) = (call_expression "__uselocale(*(undefined8 *)(param_1 + 0x10))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x10))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x10)" * (cast_expression "(undefined8 *)(param_1 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) )))) ;) (expression_statement "lVar1 = -(param_5 * 4 + 0x17 & 0xfffffffffffffff0);" (assignment_expression "lVar1 = -(param_5 * 4 + 0x17 & 0xfffffffffffffff0)" identifier = (unary_expression "-(param_5 * 4 + 0x17 & 0xfffffffffffffff0)" - (parenthesized_expression "(param_5 * 4 + 0x17 & 0xfffffffffffffff0)" ( (binary_expression "param_5 * 4 + 0x17 & 0xfffffffffffffff0" (binary_expression "param_5 * 4 + 0x17" (binary_expression "param_5 * 4" identifier * number_literal) + number_literal) & number_literal) )))) ;) (expression_statement "local_68 = (wchar_t *)((long)&local_70 + lVar1);" (assignment_expression "local_68 = (wchar_t *)((long)&local_70 + lVar1)" identifier = (cast_expression "(wchar_t *)((long)&local_70 + lVar1)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)&local_70 + lVar1)" ( (binary_expression "(long)&local_70 + lVar1" (cast_expression "(long)&local_70" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "&local_70" & identifier)) + identifier) )))) ;) (expression_statement "local_70 = local_50;" (assignment_expression "local_70 = local_50" identifier = identifier) ;) (while_statement "while (local_50[0] < param_4) {\n    while( true ) {\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }\n  }" while (parenthesized_expression "(local_50[0] < param_4)" ( (binary_expression "local_50[0] < param_4" (subscript_expression "local_50[0]" identifier [ number_literal ]) < identifier) )) (compound_statement "{\n    while( true ) {\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }\n  }" { (while_statement "while( true ) {\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }" { (expression_statement "__s = local_50[0];" (assignment_expression "__s = local_50[0]" identifier = (subscript_expression "local_50[0]" identifier [ number_literal ])) ;) (if_statement "if (param_5 == 0) goto LAB_003c3bda;" if (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) )) (goto_statement "goto LAB_003c3bda;" goto statement_identifier ;)) (expression_statement "sVar6 = (long)param_4 - (long)local_50[0];" (assignment_expression "sVar6 = (long)param_4 - (long)local_50[0]" identifier = (binary_expression "(long)param_4 - (long)local_50[0]" (cast_expression "(long)param_4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)local_50[0]" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (subscript_expression "local_50[0]" identifier [ number_literal ])))) ;) (expression_statement "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;" (assignment_expression "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55" (pointer_expression "*(undefined8 *)((long)auStack_80 + lVar1)" * (cast_expression "(undefined8 *)((long)auStack_80 + lVar1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)auStack_80 + lVar1)" ( (binary_expression "(long)auStack_80 + lVar1" (cast_expression "(long)auStack_80" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "pcVar3 = (char *)memchr(__s,0,sVar6);" (assignment_expression "pcVar3 = (char *)memchr(__s,0,sVar6)" identifier = (cast_expression "(char *)memchr(__s,0,sVar6)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "memchr(__s,0,sVar6)" identifier (argument_list "(__s,0,sVar6)" ( identifier , number_literal , identifier ))))) ;) (expression_statement "__ps = local_60;" (assignment_expression "__ps = local_60" identifier = identifier) ;) (expression_statement "__dst = local_68;" (assignment_expression "__dst = local_68" identifier = identifier) ;) (expression_statement "__src = local_70;" (assignment_expression "__src = local_70" identifier = identifier) ;) (expression_statement "local_58 = param_4;" (assignment_expression "local_58 = param_4" identifier = identifier) ;) (if_statement "if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }" { (expression_statement "sVar6 = (long)pcVar3 - (long)__s;" (assignment_expression "sVar6 = (long)pcVar3 - (long)__s" identifier = (binary_expression "(long)pcVar3 - (long)__s" (cast_expression "(long)pcVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)__s" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (expression_statement "local_58 = pcVar3;" (assignment_expression "local_58 = pcVar3" identifier = identifier) ;) })) (expression_statement "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;" (assignment_expression "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82" (pointer_expression "*(undefined8 *)((long)auStack_80 + lVar1)" * (cast_expression "(undefined8 *)((long)auStack_80 + lVar1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)auStack_80 + lVar1)" ( (binary_expression "(long)auStack_80 + lVar1" (cast_expression "(long)auStack_80" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);" (assignment_expression "sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps)" identifier = (call_expression "mbsnrtowcs(__dst,__src,sVar6,param_5,__ps)" identifier (argument_list "(__dst,__src,sVar6,param_5,__ps)" ( identifier , identifier , identifier , identifier , identifier )))) ;) (if_statement "if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }" if (parenthesized_expression "(sVar4 == 0xffffffffffffffff)" ( (binary_expression "sVar4 == 0xffffffffffffffff" identifier == number_literal) )) (compound_statement "{\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }" { (expression_statement "pcVar3 = __s;" (assignment_expression "pcVar3 = __s" identifier = identifier) ;) (while_statement "while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }" { (expression_statement "local_50[0] = pcVar3;" (assignment_expression "local_50[0] = pcVar3" (subscript_expression "local_50[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;" (assignment_expression "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b" (pointer_expression "*(undefined8 *)((long)auStack_80 + lVar1)" * (cast_expression "(undefined8 *)((long)auStack_80 + lVar1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)auStack_80 + lVar1)" ( (binary_expression "(long)auStack_80 + lVar1" (cast_expression "(long)auStack_80" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);" (assignment_expression "sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40)" identifier = (call_expression "mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40)" identifier (argument_list "((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40)" ( (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , identifier , (binary_expression "(long)param_4 - (long)pcVar3" (cast_expression "(long)param_4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)pcVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) , identifier )))) ;) (if_statement "if (sVar6 + 2 < 2) break;" if (parenthesized_expression "(sVar6 + 2 < 2)" ( (binary_expression "sVar6 + 2 < 2" (binary_expression "sVar6 + 2" identifier + number_literal) < number_literal) )) (break_statement "break;" break ;)) (expression_statement "pcVar3 = local_50[0] + sVar6;" (assignment_expression "pcVar3 = local_50[0] + sVar6" identifier = (binary_expression "local_50[0] + sVar6" (subscript_expression "local_50[0]" identifier [ number_literal ]) + identifier)) ;) })) (expression_statement "*local_60 = local_40[0];" (assignment_expression "*local_60 = local_40[0]" (pointer_expression "*local_60" * identifier) = (subscript_expression "local_40[0]" identifier [ number_literal ])) ;) (expression_statement "iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;" (assignment_expression "iVar5 = (iVar5 + (int)local_50[0]) - (int)__s" identifier = (binary_expression "(iVar5 + (int)local_50[0]) - (int)__s" (parenthesized_expression "(iVar5 + (int)local_50[0])" ( (binary_expression "iVar5 + (int)local_50[0]" identifier + (cast_expression "(int)local_50[0]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "local_50[0]" identifier [ number_literal ]))) )) - (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (goto_statement "goto LAB_003c3bda;" goto statement_identifier ;) })) (expression_statement "pcVar3 = local_58;" (assignment_expression "pcVar3 = local_58" identifier = identifier) ;) (if_statement "if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }" if (parenthesized_expression "(local_50[0] != (char *)0x0)" ( (binary_expression "local_50[0] != (char *)0x0" (subscript_expression "local_50[0]" identifier [ number_literal ]) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }" { (expression_statement "sVar6 = (long)local_50[0] - (long)__s;" (assignment_expression "sVar6 = (long)local_50[0] - (long)__s" identifier = (binary_expression "(long)local_50[0] - (long)__s" (cast_expression "(long)local_50[0]" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (subscript_expression "local_50[0]" identifier [ number_literal ])) - (cast_expression "(long)__s" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (expression_statement "pcVar3 = local_50[0];" (assignment_expression "pcVar3 = local_50[0]" identifier = (subscript_expression "local_50[0]" identifier [ number_literal ])) ;) })) (expression_statement "local_50[0] = pcVar3;" (assignment_expression "local_50[0] = pcVar3" (subscript_expression "local_50[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar5 = iVar5 + (int)sVar6;" (assignment_expression "iVar5 = iVar5 + (int)sVar6" identifier = (binary_expression "iVar5 + (int)sVar6" identifier + (cast_expression "(int)sVar6" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "param_5 = param_5 - sVar4;" (assignment_expression "param_5 = param_5 - sVar4" identifier = (binary_expression "param_5 - sVar4" identifier - identifier)) ;) (if_statement "if ((param_4 <= local_50[0]) || (param_5 == 0)) break;" if (parenthesized_expression "((param_4 <= local_50[0]) || (param_5 == 0))" ( (binary_expression "(param_4 <= local_50[0]) || (param_5 == 0)" (parenthesized_expression "(param_4 <= local_50[0])" ( (binary_expression "param_4 <= local_50[0]" identifier <= (subscript_expression "local_50[0]" identifier [ number_literal ])) )) || (parenthesized_expression "(param_5 == 0)" ( (binary_expression "param_5 == 0" identifier == number_literal) ))) )) (break_statement "break;" break ;)) (expression_statement "local_50[0] = local_50[0] + 1;" (assignment_expression "local_50[0] = local_50[0] + 1" (subscript_expression "local_50[0]" identifier [ number_literal ]) = (binary_expression "local_50[0] + 1" (subscript_expression "local_50[0]" identifier [ number_literal ]) + number_literal)) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "param_5 = param_5 - 1;" (assignment_expression "param_5 = param_5 - 1" identifier = (binary_expression "param_5 - 1" identifier - number_literal)) ;) (expression_statement "local_40[0] = *local_60;" (assignment_expression "local_40[0] = *local_60" (subscript_expression "local_40[0]" identifier [ number_literal ]) = (pointer_expression "*local_60" * identifier)) ;) (if_statement "if (param_4 <= local_50[0]) goto LAB_003c3bda;" if (parenthesized_expression "(param_4 <= local_50[0])" ( (binary_expression "param_4 <= local_50[0]" identifier <= (subscript_expression "local_50[0]" identifier [ number_literal ])) )) (goto_statement "goto LAB_003c3bda;" goto statement_identifier ;)) })) })) (labeled_statement "LAB_003c3bda:\n  uVar2 = auStack_80[1];" statement_identifier : (expression_statement "uVar2 = auStack_80[1];" (assignment_expression "uVar2 = auStack_80[1]" identifier = (subscript_expression "auStack_80[1]" identifier [ number_literal ])) ;)) (expression_statement "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3;" (assignment_expression "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3" (pointer_expression "*(undefined8 *)((long)auStack_80 + lVar1)" * (cast_expression "(undefined8 *)((long)auStack_80 + lVar1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)auStack_80 + lVar1)" ( (binary_expression "(long)auStack_80 + lVar1" (cast_expression "(long)auStack_80" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "__uselocale(uVar2);" (call_expression "__uselocale(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return iVar5;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * (array_declarator IDENT [ LIT ])) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (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 IDENT = (unary_expression - (parenthesized_expression ( (binary_expression (binary_expression (binary_expression IDENT * LIT) + LIT) & LIT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (pointer_expression & IDENT)) + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (while_statement while (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) < IDENT) )) (compound_statement { (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) - (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (subscript_expression IDENT [ LIT ])))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + IDENT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT , IDENT ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = 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 (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) - (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + IDENT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + IDENT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) , IDENT , (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) - (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) < LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT)) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) )) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (subscript_expression IDENT [ LIT ])) - (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT <= (subscript_expression IDENT [ LIT ])) )) || (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (break_statement break ;)) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (subscript_expression IDENT [ LIT ])) )) (goto_statement goto statement_identifier ;)) })) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;)) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + IDENT) )))) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return IDENT ;) })))
(function_definition "int FUN_003c3ad0(long param_1,mbstate_t *param_2,char *param_3,char *param_4,size_t param_5)\n\n{\n  long lVar1;\n  undefined8 uVar2;\n  char **__src;\n  wchar_t *__dst;\n  mbstate_t *__ps;\n  char *__s;\n  char *pcVar3;\n  size_t sVar4;\n  int iVar5;\n  size_t sVar6;\n  undefined8 auStack_80 [2];\n  char **local_70;\n  wchar_t *local_68;\n  mbstate_t *local_60;\n  char *local_58;\n  char *local_50 [2];\n  mbstate_t local_40 [2];\n  \n  iVar5 = 0;\n  local_40[0] = *param_2;\n  auStack_80[0] = 0x3c3b02;\n  local_60 = param_2;\n  local_50[0] = param_3;\n  auStack_80[1] = __uselocale(*(undefined8 *)(param_1 + 0x10));\n  lVar1 = -(param_5 * 4 + 0x17 & 0xfffffffffffffff0);\n  local_68 = (wchar_t *)((long)&local_70 + lVar1);\n  local_70 = local_50;\n  while (local_50[0] < param_4) {\n    while( true ) {\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }\n  }\nLAB_003c3bda:\n  uVar2 = auStack_80[1];\n  *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3;\n  __uselocale(uVar2);\n  return iVar5;\n}" (primitive_type "int") (function_declarator "FUN_003c3ad0(long param_1,mbstate_t *param_2,char *param_3,char *param_4,size_t param_5)" (identifier "FUN_003c3ad0") (parameter_list "(long param_1,mbstate_t *param_2,char *param_3,char *param_4,size_t param_5)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "mbstate_t *param_2" (type_identifier "mbstate_t") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "char *param_3" (primitive_type "char") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "char *param_4" (primitive_type "char") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "size_t param_5" (primitive_type "size_t") (identifier "param_5")) () ")"))) (compound_statement "{\n  long lVar1;\n  undefined8 uVar2;\n  char **__src;\n  wchar_t *__dst;\n  mbstate_t *__ps;\n  char *__s;\n  char *pcVar3;\n  size_t sVar4;\n  int iVar5;\n  size_t sVar6;\n  undefined8 auStack_80 [2];\n  char **local_70;\n  wchar_t *local_68;\n  mbstate_t *local_60;\n  char *local_58;\n  char *local_50 [2];\n  mbstate_t local_40 [2];\n  \n  iVar5 = 0;\n  local_40[0] = *param_2;\n  auStack_80[0] = 0x3c3b02;\n  local_60 = param_2;\n  local_50[0] = param_3;\n  auStack_80[1] = __uselocale(*(undefined8 *)(param_1 + 0x10));\n  lVar1 = -(param_5 * 4 + 0x17 & 0xfffffffffffffff0);\n  local_68 = (wchar_t *)((long)&local_70 + lVar1);\n  local_70 = local_50;\n  while (local_50[0] < param_4) {\n    while( true ) {\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }\n  }\nLAB_003c3bda:\n  uVar2 = auStack_80[1];\n  *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3;\n  __uselocale(uVar2);\n  return iVar5;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (declaration "char **__src;" (primitive_type "char") (pointer_declarator "**__src" (* "*") (pointer_declarator "*__src" (* "*") (identifier "__src"))) (; ";")) (declaration "wchar_t *__dst;" (type_identifier "wchar_t") (pointer_declarator "*__dst" (* "*") (identifier "__dst")) (; ";")) (declaration "mbstate_t *__ps;" (type_identifier "mbstate_t") (pointer_declarator "*__ps" (* "*") (identifier "__ps")) (; ";")) (declaration "char *__s;" (primitive_type "char") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "char *pcVar3;" (primitive_type "char") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "size_t sVar4;" (primitive_type "size_t") (identifier "sVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "size_t sVar6;" (primitive_type "size_t") (identifier "sVar6") (; ";")) (declaration "undefined8 auStack_80 [2];" (type_identifier "undefined8") (array_declarator "auStack_80 [2]" (identifier "auStack_80") ([ "[") (number_literal "2") (] "]")) (; ";")) (declaration "char **local_70;" (primitive_type "char") (pointer_declarator "**local_70" (* "*") (pointer_declarator "*local_70" (* "*") (identifier "local_70"))) (; ";")) (declaration "wchar_t *local_68;" (type_identifier "wchar_t") (pointer_declarator "*local_68" (* "*") (identifier "local_68")) (; ";")) (declaration "mbstate_t *local_60;" (type_identifier "mbstate_t") (pointer_declarator "*local_60" (* "*") (identifier "local_60")) (; ";")) (declaration "char *local_58;" (primitive_type "char") (pointer_declarator "*local_58" (* "*") (identifier "local_58")) (; ";")) (declaration "char *local_50 [2];" (primitive_type "char") (pointer_declarator "*local_50 [2]" (* "*") (array_declarator "local_50 [2]" (identifier "local_50") ([ "[") (number_literal "2") (] "]"))) (; ";")) (declaration "mbstate_t local_40 [2];" (type_identifier "mbstate_t") (array_declarator "local_40 [2]" (identifier "local_40") ([ "[") (number_literal "2") (] "]")) (; ";")) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" (identifier "iVar5") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_40[0] = *param_2;" (assignment_expression "local_40[0] = *param_2" (subscript_expression "local_40[0]" (identifier "local_40") ([ "[") (number_literal "0") (] "]")) (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "auStack_80[0] = 0x3c3b02;" (assignment_expression "auStack_80[0] = 0x3c3b02" (subscript_expression "auStack_80[0]" (identifier "auStack_80") ([ "[") (number_literal "0") (] "]")) (= "=") (number_literal "0x3c3b02")) (; ";")) (expression_statement "local_60 = param_2;" (assignment_expression "local_60 = param_2" (identifier "local_60") (= "=") (identifier "param_2")) (; ";")) (expression_statement "local_50[0] = param_3;" (assignment_expression "local_50[0] = param_3" (subscript_expression "local_50[0]" (identifier "local_50") ([ "[") (number_literal "0") (] "]")) (= "=") (identifier "param_3")) (; ";")) (expression_statement "auStack_80[1] = __uselocale(*(undefined8 *)(param_1 + 0x10));" (assignment_expression "auStack_80[1] = __uselocale(*(undefined8 *)(param_1 + 0x10))" (subscript_expression "auStack_80[1]" (identifier "auStack_80") ([ "[") (number_literal "1") (] "]")) (= "=") (call_expression "__uselocale(*(undefined8 *)(param_1 + 0x10))" (identifier "__uselocale") (argument_list "(*(undefined8 *)(param_1 + 0x10))" (( "(") (pointer_expression "*(undefined8 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) () ")")))) (; ";")) (expression_statement "lVar1 = -(param_5 * 4 + 0x17 & 0xfffffffffffffff0);" (assignment_expression "lVar1 = -(param_5 * 4 + 0x17 & 0xfffffffffffffff0)" (identifier "lVar1") (= "=") (unary_expression "-(param_5 * 4 + 0x17 & 0xfffffffffffffff0)" (- "-") (parenthesized_expression "(param_5 * 4 + 0x17 & 0xfffffffffffffff0)" (( "(") (binary_expression "param_5 * 4 + 0x17 & 0xfffffffffffffff0" (binary_expression "param_5 * 4 + 0x17" (binary_expression "param_5 * 4" (identifier "param_5") (* "*") (number_literal "4")) (+ "+") (number_literal "0x17")) (& "&") (number_literal "0xfffffffffffffff0")) () ")")))) (; ";")) (expression_statement "local_68 = (wchar_t *)((long)&local_70 + lVar1);" (assignment_expression "local_68 = (wchar_t *)((long)&local_70 + lVar1)" (identifier "local_68") (= "=") (cast_expression "(wchar_t *)((long)&local_70 + lVar1)" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)&local_70 + lVar1)" (( "(") (binary_expression "(long)&local_70 + lVar1" (cast_expression "(long)&local_70" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (pointer_expression "&local_70" (& "&") (identifier "local_70"))) (+ "+") (identifier "lVar1")) () ")")))) (; ";")) (expression_statement "local_70 = local_50;" (assignment_expression "local_70 = local_50" (identifier "local_70") (= "=") (identifier "local_50")) (; ";")) (while_statement "while (local_50[0] < param_4) {\n    while( true ) {\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }\n  }" (while "while") (parenthesized_expression "(local_50[0] < param_4)" (( "(") (binary_expression "local_50[0] < param_4" (subscript_expression "local_50[0]" (identifier "local_50") ([ "[") (number_literal "0") (] "]")) (< "<") (identifier "param_4")) () ")")) (compound_statement "{\n    while( true ) {\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }\n  }" ({ "{") (while_statement "while( true ) {\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      __s = local_50[0];\n      if (param_5 == 0) goto LAB_003c3bda;\n      sVar6 = (long)param_4 - (long)local_50[0];\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;\n      pcVar3 = (char *)memchr(__s,0,sVar6);\n      __ps = local_60;\n      __dst = local_68;\n      __src = local_70;\n      local_58 = param_4;\n      if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }\n      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;\n      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);\n      if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }\n      pcVar3 = local_58;\n      if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }\n      local_50[0] = pcVar3;\n      iVar5 = iVar5 + (int)sVar6;\n      param_5 = param_5 - sVar4;\n      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;\n      local_50[0] = local_50[0] + 1;\n      iVar5 = iVar5 + 1;\n      param_5 = param_5 - 1;\n      local_40[0] = *local_60;\n      if (param_4 <= local_50[0]) goto LAB_003c3bda;\n    }" ({ "{") (expression_statement "__s = local_50[0];" (assignment_expression "__s = local_50[0]" (identifier "__s") (= "=") (subscript_expression "local_50[0]" (identifier "local_50") ([ "[") (number_literal "0") (] "]"))) (; ";")) (if_statement "if (param_5 == 0) goto LAB_003c3bda;" (if "if") (parenthesized_expression "(param_5 == 0)" (( "(") (binary_expression "param_5 == 0" (identifier "param_5") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_003c3bda;" (goto "goto") (statement_identifier "LAB_003c3bda") (; ";"))) (expression_statement "sVar6 = (long)param_4 - (long)local_50[0];" (assignment_expression "sVar6 = (long)param_4 - (long)local_50[0]" (identifier "sVar6") (= "=") (binary_expression "(long)param_4 - (long)local_50[0]" (cast_expression "(long)param_4" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_4")) (- "-") (cast_expression "(long)local_50[0]" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (subscript_expression "local_50[0]" (identifier "local_50") ([ "[") (number_literal "0") (] "]"))))) (; ";")) (expression_statement "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;" (assignment_expression "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55" (pointer_expression "*(undefined8 *)((long)auStack_80 + lVar1)" (* "*") (cast_expression "(undefined8 *)((long)auStack_80 + lVar1)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)auStack_80 + lVar1)" (( "(") (binary_expression "(long)auStack_80 + lVar1" (cast_expression "(long)auStack_80" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "auStack_80")) (+ "+") (identifier "lVar1")) () ")")))) (= "=") (number_literal "0x3c3b55")) (; ";")) (expression_statement "pcVar3 = (char *)memchr(__s,0,sVar6);" (assignment_expression "pcVar3 = (char *)memchr(__s,0,sVar6)" (identifier "pcVar3") (= "=") (cast_expression "(char *)memchr(__s,0,sVar6)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "memchr(__s,0,sVar6)" (identifier "memchr") (argument_list "(__s,0,sVar6)" (( "(") (identifier "__s") (, ",") (number_literal "0") (, ",") (identifier "sVar6") () ")"))))) (; ";")) (expression_statement "__ps = local_60;" (assignment_expression "__ps = local_60" (identifier "__ps") (= "=") (identifier "local_60")) (; ";")) (expression_statement "__dst = local_68;" (assignment_expression "__dst = local_68" (identifier "__dst") (= "=") (identifier "local_68")) (; ";")) (expression_statement "__src = local_70;" (assignment_expression "__src = local_70" (identifier "__src") (= "=") (identifier "local_70")) (; ";")) (expression_statement "local_58 = param_4;" (assignment_expression "local_58 = param_4" (identifier "local_58") (= "=") (identifier "param_4")) (; ";")) (if_statement "if (pcVar3 != (char *)0x0) {\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }" (if "if") (parenthesized_expression "(pcVar3 != (char *)0x0)" (( "(") (binary_expression "pcVar3 != (char *)0x0" (identifier "pcVar3") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        sVar6 = (long)pcVar3 - (long)__s;\n        local_58 = pcVar3;\n      }" ({ "{") (expression_statement "sVar6 = (long)pcVar3 - (long)__s;" (assignment_expression "sVar6 = (long)pcVar3 - (long)__s" (identifier "sVar6") (= "=") (binary_expression "(long)pcVar3 - (long)__s" (cast_expression "(long)pcVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "pcVar3")) (- "-") (cast_expression "(long)__s" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "__s")))) (; ";")) (expression_statement "local_58 = pcVar3;" (assignment_expression "local_58 = pcVar3" (identifier "local_58") (= "=") (identifier "pcVar3")) (; ";")) (} "}"))) (expression_statement "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;" (assignment_expression "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82" (pointer_expression "*(undefined8 *)((long)auStack_80 + lVar1)" (* "*") (cast_expression "(undefined8 *)((long)auStack_80 + lVar1)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)auStack_80 + lVar1)" (( "(") (binary_expression "(long)auStack_80 + lVar1" (cast_expression "(long)auStack_80" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "auStack_80")) (+ "+") (identifier "lVar1")) () ")")))) (= "=") (number_literal "0x3c3b82")) (; ";")) (expression_statement "sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);" (assignment_expression "sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps)" (identifier "sVar4") (= "=") (call_expression "mbsnrtowcs(__dst,__src,sVar6,param_5,__ps)" (identifier "mbsnrtowcs") (argument_list "(__dst,__src,sVar6,param_5,__ps)" (( "(") (identifier "__dst") (, ",") (identifier "__src") (, ",") (identifier "sVar6") (, ",") (identifier "param_5") (, ",") (identifier "__ps") () ")")))) (; ";")) (if_statement "if (sVar4 == 0xffffffffffffffff) {\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }" (if "if") (parenthesized_expression "(sVar4 == 0xffffffffffffffff)" (( "(") (binary_expression "sVar4 == 0xffffffffffffffff" (identifier "sVar4") (== "==") (number_literal "0xffffffffffffffff")) () ")")) (compound_statement "{\n        pcVar3 = __s;\n        while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }\n        *local_60 = local_40[0];\n        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;\n        goto LAB_003c3bda;\n      }" ({ "{") (expression_statement "pcVar3 = __s;" (assignment_expression "pcVar3 = __s" (identifier "pcVar3") (= "=") (identifier "__s")) (; ";")) (while_statement "while( true ) {\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n          local_50[0] = pcVar3;\n          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;\n          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);\n          if (sVar6 + 2 < 2) break;\n          pcVar3 = local_50[0] + sVar6;\n        }" ({ "{") (expression_statement "local_50[0] = pcVar3;" (assignment_expression "local_50[0] = pcVar3" (subscript_expression "local_50[0]" (identifier "local_50") ([ "[") (number_literal "0") (] "]")) (= "=") (identifier "pcVar3")) (; ";")) (expression_statement "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;" (assignment_expression "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b" (pointer_expression "*(undefined8 *)((long)auStack_80 + lVar1)" (* "*") (cast_expression "(undefined8 *)((long)auStack_80 + lVar1)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)auStack_80 + lVar1)" (( "(") (binary_expression "(long)auStack_80 + lVar1" (cast_expression "(long)auStack_80" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "auStack_80")) (+ "+") (identifier "lVar1")) () ")")))) (= "=") (number_literal "0x3c3c3b")) (; ";")) (expression_statement "sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);" (assignment_expression "sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40)" (identifier "sVar6") (= "=") (call_expression "mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40)" (identifier "mbrtowc") (argument_list "((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40)" (( "(") (cast_expression "(wchar_t *)0x0" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (, ",") (identifier "pcVar3") (, ",") (binary_expression "(long)param_4 - (long)pcVar3" (cast_expression "(long)param_4" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_4")) (- "-") (cast_expression "(long)pcVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "pcVar3"))) (, ",") (identifier "local_40") () ")")))) (; ";")) (if_statement "if (sVar6 + 2 < 2) break;" (if "if") (parenthesized_expression "(sVar6 + 2 < 2)" (( "(") (binary_expression "sVar6 + 2 < 2" (binary_expression "sVar6 + 2" (identifier "sVar6") (+ "+") (number_literal "2")) (< "<") (number_literal "2")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "pcVar3 = local_50[0] + sVar6;" (assignment_expression "pcVar3 = local_50[0] + sVar6" (identifier "pcVar3") (= "=") (binary_expression "local_50[0] + sVar6" (subscript_expression "local_50[0]" (identifier "local_50") ([ "[") (number_literal "0") (] "]")) (+ "+") (identifier "sVar6"))) (; ";")) (} "}"))) (expression_statement "*local_60 = local_40[0];" (assignment_expression "*local_60 = local_40[0]" (pointer_expression "*local_60" (* "*") (identifier "local_60")) (= "=") (subscript_expression "local_40[0]" (identifier "local_40") ([ "[") (number_literal "0") (] "]"))) (; ";")) (expression_statement "iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;" (assignment_expression "iVar5 = (iVar5 + (int)local_50[0]) - (int)__s" (identifier "iVar5") (= "=") (binary_expression "(iVar5 + (int)local_50[0]) - (int)__s" (parenthesized_expression "(iVar5 + (int)local_50[0])" (( "(") (binary_expression "iVar5 + (int)local_50[0]" (identifier "iVar5") (+ "+") (cast_expression "(int)local_50[0]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "local_50[0]" (identifier "local_50") ([ "[") (number_literal "0") (] "]")))) () ")")) (- "-") (cast_expression "(int)__s" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__s")))) (; ";")) (goto_statement "goto LAB_003c3bda;" (goto "goto") (statement_identifier "LAB_003c3bda") (; ";")) (} "}"))) (expression_statement "pcVar3 = local_58;" (assignment_expression "pcVar3 = local_58" (identifier "pcVar3") (= "=") (identifier "local_58")) (; ";")) (if_statement "if (local_50[0] != (char *)0x0) {\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }" (if "if") (parenthesized_expression "(local_50[0] != (char *)0x0)" (( "(") (binary_expression "local_50[0] != (char *)0x0" (subscript_expression "local_50[0]" (identifier "local_50") ([ "[") (number_literal "0") (] "]")) (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        sVar6 = (long)local_50[0] - (long)__s;\n        pcVar3 = local_50[0];\n      }" ({ "{") (expression_statement "sVar6 = (long)local_50[0] - (long)__s;" (assignment_expression "sVar6 = (long)local_50[0] - (long)__s" (identifier "sVar6") (= "=") (binary_expression "(long)local_50[0] - (long)__s" (cast_expression "(long)local_50[0]" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (subscript_expression "local_50[0]" (identifier "local_50") ([ "[") (number_literal "0") (] "]"))) (- "-") (cast_expression "(long)__s" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "__s")))) (; ";")) (expression_statement "pcVar3 = local_50[0];" (assignment_expression "pcVar3 = local_50[0]" (identifier "pcVar3") (= "=") (subscript_expression "local_50[0]" (identifier "local_50") ([ "[") (number_literal "0") (] "]"))) (; ";")) (} "}"))) (expression_statement "local_50[0] = pcVar3;" (assignment_expression "local_50[0] = pcVar3" (subscript_expression "local_50[0]" (identifier "local_50") ([ "[") (number_literal "0") (] "]")) (= "=") (identifier "pcVar3")) (; ";")) (expression_statement "iVar5 = iVar5 + (int)sVar6;" (assignment_expression "iVar5 = iVar5 + (int)sVar6" (identifier "iVar5") (= "=") (binary_expression "iVar5 + (int)sVar6" (identifier "iVar5") (+ "+") (cast_expression "(int)sVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "sVar6")))) (; ";")) (expression_statement "param_5 = param_5 - sVar4;" (assignment_expression "param_5 = param_5 - sVar4" (identifier "param_5") (= "=") (binary_expression "param_5 - sVar4" (identifier "param_5") (- "-") (identifier "sVar4"))) (; ";")) (if_statement "if ((param_4 <= local_50[0]) || (param_5 == 0)) break;" (if "if") (parenthesized_expression "((param_4 <= local_50[0]) || (param_5 == 0))" (( "(") (binary_expression "(param_4 <= local_50[0]) || (param_5 == 0)" (parenthesized_expression "(param_4 <= local_50[0])" (( "(") (binary_expression "param_4 <= local_50[0]" (identifier "param_4") (<= "<=") (subscript_expression "local_50[0]" (identifier "local_50") ([ "[") (number_literal "0") (] "]"))) () ")")) (|| "||") (parenthesized_expression "(param_5 == 0)" (( "(") (binary_expression "param_5 == 0" (identifier "param_5") (== "==") (number_literal "0")) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "local_50[0] = local_50[0] + 1;" (assignment_expression "local_50[0] = local_50[0] + 1" (subscript_expression "local_50[0]" (identifier "local_50") ([ "[") (number_literal "0") (] "]")) (= "=") (binary_expression "local_50[0] + 1" (subscript_expression "local_50[0]" (identifier "local_50") ([ "[") (number_literal "0") (] "]")) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "param_5 = param_5 - 1;" (assignment_expression "param_5 = param_5 - 1" (identifier "param_5") (= "=") (binary_expression "param_5 - 1" (identifier "param_5") (- "-") (number_literal "1"))) (; ";")) (expression_statement "local_40[0] = *local_60;" (assignment_expression "local_40[0] = *local_60" (subscript_expression "local_40[0]" (identifier "local_40") ([ "[") (number_literal "0") (] "]")) (= "=") (pointer_expression "*local_60" (* "*") (identifier "local_60"))) (; ";")) (if_statement "if (param_4 <= local_50[0]) goto LAB_003c3bda;" (if "if") (parenthesized_expression "(param_4 <= local_50[0])" (( "(") (binary_expression "param_4 <= local_50[0]" (identifier "param_4") (<= "<=") (subscript_expression "local_50[0]" (identifier "local_50") ([ "[") (number_literal "0") (] "]"))) () ")")) (goto_statement "goto LAB_003c3bda;" (goto "goto") (statement_identifier "LAB_003c3bda") (; ";"))) (} "}"))) (} "}"))) (labeled_statement "LAB_003c3bda:\n  uVar2 = auStack_80[1];" (statement_identifier "LAB_003c3bda") (: ":") (expression_statement "uVar2 = auStack_80[1];" (assignment_expression "uVar2 = auStack_80[1]" (identifier "uVar2") (= "=") (subscript_expression "auStack_80[1]" (identifier "auStack_80") ([ "[") (number_literal "1") (] "]"))) (; ";"))) (expression_statement "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3;" (assignment_expression "*(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3" (pointer_expression "*(undefined8 *)((long)auStack_80 + lVar1)" (* "*") (cast_expression "(undefined8 *)((long)auStack_80 + lVar1)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)auStack_80 + lVar1)" (( "(") (binary_expression "(long)auStack_80 + lVar1" (cast_expression "(long)auStack_80" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "auStack_80")) (+ "+") (identifier "lVar1")) () ")")))) (= "=") (number_literal "0x3c3be3")) (; ";")) (expression_statement "__uselocale(uVar2);" (call_expression "__uselocale(uVar2)" (identifier "__uselocale") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (return_statement "return iVar5;" (return "return") (identifier "iVar5") (; ";")) (} "}")))

/* std::codecvt<wchar_t, char, __mbstate_t>::do_length(__mbstate_t&, char const*, char const*,
   unsigned long) const */

int __thiscall
std::codecvt<type_2,char,type_3>::do_length
          (codecvt<type_2,char,type_3> *var_2,type_3 *param_1,char *param_2,char *var_5,
          ulong var_3)

{
  long var_4;
  type_1 uVar2;
  char **__src;
  type_2 *__dst;
  type_3 *__ps;
  char *__s;
  char *var_7;
  size_t var_9;
  int var_12;
  size_t var_11;
  type_1 auStack_80 [2];
  char **local_70;
  type_2 *local_68;
  type_3 *local_60;
  char *local_58;
  char *local_50 [2];
  type_3 local_40 [2];
  
  var_12 = 0;
  local_40[0] = *param_1;
  auStack_80[0] = 0x3c3b02;
  local_60 = param_1;
  local_50[0] = param_2;
  auStack_80[1] = var_1(*(type_1 *)(var_2 + 0x10));
  var_4 = -(var_3 * 4 + 0x17 & 0xfffffffffffffff0);
  local_68 = (type_2 *)((long)&local_70 + var_4);
  local_70 = local_50;
  while (local_50[0] < var_5) {
    while( true ) {
      __s = local_50[0];
      if (var_3 == 0) goto LAB_003c3bda;
      var_11 = (long)var_5 - (long)local_50[0];
      *(type_1 *)((long)auStack_80 + var_4) = 0x3c3b55;
      var_7 = (char *)var_6(__s,0,var_11);
      __ps = local_60;
      __dst = local_68;
      __src = local_70;
      local_58 = var_5;
      if (var_7 != (char *)0x0) {
        var_11 = (long)var_7 - (long)__s;
        local_58 = var_7;
      }
      *(type_1 *)((long)auStack_80 + var_4) = 0x3c3b82;
      var_9 = var_8(__dst,__src,var_11,var_3,__ps);
      if (var_9 == 0xffffffffffffffff) {
        var_7 = __s;
        while( true ) {
          local_50[0] = var_7;
          *(type_1 *)((long)auStack_80 + var_4) = 0x3c3c3b;
          var_11 = var_10((type_2 *)0x0,var_7,(long)var_5 - (long)var_7,local_40);
          if (var_11 + 2 < 2) break;
          var_7 = local_50[0] + var_11;
        }
        *local_60 = local_40[0];
        var_12 = (var_12 + (int)local_50[0]) - (int)__s;
        goto LAB_003c3bda;
      }
      var_7 = local_58;
      if (local_50[0] != (char *)0x0) {
        var_11 = (long)local_50[0] - (long)__s;
        var_7 = local_50[0];
      }
      local_50[0] = var_7;
      var_12 = var_12 + (int)var_11;
      var_3 = var_3 - var_9;
      if ((var_5 <= local_50[0]) || (var_3 == 0)) break;
      local_50[0] = local_50[0] + 1;
      var_12 = var_12 + 1;
      var_3 = var_3 - 1;
      local_40[0] = *local_60;
      if (var_5 <= local_50[0]) goto LAB_003c3bda;
    }
  }
LAB_003c3bda:
  uVar2 = auStack_80[1];
  *(type_1 *)((long)auStack_80 + var_4) = 0x3c3be3;
  var_1(uVar2);
  return var_12;
}


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

int MASKED(long param_1,mbstate_t *param_2,char *param_3,char *param_4,size_t param_5)

{
  long lVar1;
  undefined8 uVar2;
  char **__src;
  wchar_t *__dst;
  mbstate_t *__ps;
  char *__s;
  char *pcVar3;
  size_t sVar4;
  int iVar5;
  size_t sVar6;
  undefined8 auStack_80 [2];
  char **local_70;
  wchar_t *local_68;
  mbstate_t *local_60;
  char *local_58;
  char *local_50 [2];
  mbstate_t local_40 [2];
  
  iVar5 = 0;
  local_40[0] = *param_2;
  auStack_80[0] = 0x3c3b02;
  local_60 = param_2;
  local_50[0] = param_3;
  auStack_80[1] = __uselocale(*(undefined8 *)(param_1 + 0x10));
  lVar1 = -(param_5 * 4 + 0x17 & 0xfffffffffffffff0);
  local_68 = (wchar_t *)((long)&local_70 + lVar1);
  local_70 = local_50;
  while (local_50[0] < param_4) {
    while( true ) {
      __s = local_50[0];
      if (param_5 == 0) goto LAB_003c3bda;
      sVar6 = (long)param_4 - (long)local_50[0];
      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b55;
      pcVar3 = (char *)memchr(__s,0,sVar6);
      __ps = local_60;
      __dst = local_68;
      __src = local_70;
      local_58 = param_4;
      if (pcVar3 != (char *)0x0) {
        sVar6 = (long)pcVar3 - (long)__s;
        local_58 = pcVar3;
      }
      *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3b82;
      sVar4 = mbsnrtowcs(__dst,__src,sVar6,param_5,__ps);
      if (sVar4 == 0xffffffffffffffff) {
        pcVar3 = __s;
        while( true ) {
          local_50[0] = pcVar3;
          *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3c3b;
          sVar6 = mbrtowc((wchar_t *)0x0,pcVar3,(long)param_4 - (long)pcVar3,local_40);
          if (sVar6 + 2 < 2) break;
          pcVar3 = local_50[0] + sVar6;
        }
        *local_60 = local_40[0];
        iVar5 = (iVar5 + (int)local_50[0]) - (int)__s;
        goto LAB_003c3bda;
      }
      pcVar3 = local_58;
      if (local_50[0] != (char *)0x0) {
        sVar6 = (long)local_50[0] - (long)__s;
        pcVar3 = local_50[0];
      }
      local_50[0] = pcVar3;
      iVar5 = iVar5 + (int)sVar6;
      param_5 = param_5 - sVar4;
      if ((param_4 <= local_50[0]) || (param_5 == 0)) break;
      local_50[0] = local_50[0] + 1;
      iVar5 = iVar5 + 1;
      param_5 = param_5 - 1;
      local_40[0] = *local_60;
      if (param_4 <= local_50[0]) goto LAB_003c3bda;
    }
  }
LAB_003c3bda:
  uVar2 = auStack_80[1];
  *(undefined8 *)((long)auStack_80 + lVar1) = 0x3c3be3;
  __uselocale(uVar2);
  return iVar5;
}

