
/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* WARNING: Unknown calling convention */

RECVALUE rs1scan(IOBUF *iop,recmatch *recm,SCANSTATE *state)

{
  byte bVar1;
  byte bVar2;
  int iVar3;
  byte *pbVar4;
  SCANSTATE SVar5;
  NODE *pNVar6;
  RECVALUE RVar7;
  size_t sVar8;
  byte *pbVar9;
  byte *pbVar10;
  size_t __n;
  size_t sVar11;
  int in_GS_OFFSET;
  mbstate_t mbs;
  
  pNVar6 = RS;
  iVar3 = *(int *)(in_GS_OFFSET + 0x14);
  recm->start = (char *)0x0;
  recm->len = 0;
  recm->rt_start = (char *)0x0;
  recm->rt_len = 0;
  bVar2 = *(pNVar6->sub).val.sp;
  *iop->dataend = bVar2;
  SVar5 = *state;
  pbVar10 = (byte *)iop->off;
  recm->start = (char *)pbVar10;
  pbVar9 = pbVar10;
  if (SVar5 == INDATA) {
    pbVar9 = pbVar10 + iop->scanoff;
  }
  pbVar4 = (byte *)iop->dataend;
  if ((bVar2 == 10) || (gawk_mb_cur_max < 2)) {
    bVar1 = *pbVar9;
    while (bVar1 != bVar2) {
      pbVar9 = pbVar9 + 1;
      bVar1 = *pbVar9;
    }
    recm->len = (int)pbVar9 - (int)pbVar10;
    if (pbVar9 < pbVar4) {
      recm->rt_start = (char *)pbVar9;
      recm->rt_len = 1;
      *state = NOSTATE;
      RVar7 = REC_OK;
    }
    else {
      RVar7 = NOTERM;
      *state = INDATA;
      iop->scanoff = (int)pbVar9 - (int)pbVar10;
    }
  }
  else {
    __n = (int)pbVar4 - (int)pbVar9;
    mbs.__count = 0;
    mbs.__value.__wch = 0;
    do {
      pbVar10 = pbVar9;
      bVar1 = *pbVar10;
      if (((&btowc_cache)[bVar1] == -1) &&
         (sVar8 = mbrtowc((wchar_t *)0x0,(char *)pbVar10,__n,(mbstate_t *)&mbs),
         sVar8 - 2 < 0xfffffffc)) {
        __n = __n - sVar8;
        pbVar9 = pbVar10 + sVar8;
      }
      else {
        sVar8 = 1;
        __n = __n - 1;
        pbVar9 = pbVar10 + 1;
      }
    } while ((0 < (int)__n) && (bVar1 != bVar2));
    sVar11 = (int)pbVar9 - (int)recm->start;
    if ((bVar1 == bVar2) && (pbVar10 < iop->dataend)) {
      recm->rt_len = sVar8;
      recm->len = sVar11 - sVar8;
      recm->rt_start = (char *)pbVar10;
      *state = NOSTATE;
      RVar7 = REC_OK;
    }
    else {
      recm->len = sVar11;
      *state = INDATA;
      iop->scanoff = (int)pbVar9 - (int)iop->off;
      RVar7 = NOTERM;
    }
  }
  if (iVar3 == *(int *)(in_GS_OFFSET + 0x14)) {
    return RVar7;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

undefined4 FUN_0005ddf0(int param_1,int *param_2,int *param_3)

{
  byte bVar1;
  byte bVar2;
  byte *pbVar3;
  int iVar4;
  undefined4 uVar5;
  size_t sVar6;
  byte *pbVar7;
  byte *pbVar8;
  size_t __n;
  int in_GS_OFFSET;
  mbstate_t local_28;
  int local_20;
  undefined4 uStack_14;
  
  iVar4 = DAT_000c3744;
  uStack_14 = 0x5ddf9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  *param_2 = 0;
  param_2[1] = 0;
  param_2[2] = 0;
  param_2[3] = 0;
  bVar2 = **(byte **)(iVar4 + 8);
  **(byte **)(param_1 + 0x80) = bVar2;
  iVar4 = *param_3;
  pbVar8 = *(byte **)(param_1 + 0x7c);
  *param_2 = (int)pbVar8;
  pbVar7 = pbVar8;
  if (iVar4 == 2) {
    pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);
  }
  pbVar3 = *(byte **)(param_1 + 0x80);
  if ((bVar2 == 10) || (DAT_000c49c0 < 2)) {
    bVar1 = *pbVar7;
    while (bVar1 != bVar2) {
      pbVar7 = pbVar7 + 1;
      bVar1 = *pbVar7;
    }
    param_2[1] = (int)pbVar7 - (int)pbVar8;
    if (pbVar7 < pbVar3) {
      param_2[2] = (int)pbVar7;
      param_2[3] = 1;
      *param_3 = 0;
      uVar5 = 0;
    }
    else {
      uVar5 = 1;
      *param_3 = 2;
      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;
    }
  }
  else {
    __n = (int)pbVar3 - (int)pbVar7;
    local_28.__count = 0;
    local_28.__value.__wch = 0;
    do {
      pbVar8 = pbVar7;
      bVar1 = *pbVar8;
      if (((&DAT_000c4b60)[bVar1] == -1) &&
         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {
        __n = __n - sVar6;
        pbVar7 = pbVar8 + sVar6;
      }
      else {
        sVar6 = 1;
        __n = __n - 1;
        pbVar7 = pbVar8 + 1;
      }
    } while ((0 < (int)__n) && (bVar1 != bVar2));
    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {
      param_2[3] = sVar6;
      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;
      param_2[2] = (int)pbVar8;
      *param_3 = 0;
      uVar5 = 0;
    }
    else {
      param_2[1] = (int)pbVar7 - *param_2;
      *param_3 = 2;
      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);
      uVar5 = 1;
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar5;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00087be0();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001a5ee
ADD EAX,0x60eeb
SUB ESP,0x3c
MOV EBP,dword ptr [ESP + 0x54]
MOV dword ptr [ESP + 0x8],EAX
MOV EAX,dword ptr [EAX + 0x4a60]
MOV ECX,dword ptr [ESP + 0x50]
MOV EDX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x2c],EDX
XOR EDX,EDX
MOV dword ptr [EBP],0x0
MOV dword ptr [EBP + 0x4],0x0
MOV dword ptr [EBP + 0x8],0x0
MOV dword ptr [EBP + 0xc],0x0
MOV EAX,dword ptr [EAX + 0x8]
MOV EDI,dword ptr [ESP + 0x58]
MOV dword ptr [ESP + 0x4],ECX
MOVZX EDX,byte ptr [EAX]
MOV EAX,dword ptr [ECX + 0x80]
MOV dword ptr [ESP + 0x14],EDI
MOV byte ptr [EAX],DL
CMP dword ptr [EDI],0x2
MOV EAX,dword ptr [ECX + 0x7c]
MOV dword ptr [EBP],EAX
MOV ESI,EAX
JNZ 0x0005de69
ADD ESI,dword ptr [ECX + 0x94]
MOV EBX,dword ptr [ESP + 0x4]
CMP DL,0xa
MOV EDI,dword ptr [EBX + 0x80]
JZ 0x0005de87
MOV EBX,dword ptr [ESP + 0x8]
LEA ECX,[EBX + 0x5cdc]
CMP dword ptr [ECX],0x1
JG 0x0005def0
CMP byte ptr [ESI],DL
JZ 0x0005de97
NOP
LEA ESI,[ESI]
ADD ESI,0x1
CMP byte ptr [ESI],DL
JNZ 0x0005de90
MOV EBX,ESI
SUB EBX,EAX
CMP ESI,EDI
MOV dword ptr [EBP + 0x4],EBX
JC 0x0005ded8
MOV EDX,dword ptr [ESP + 0x14]
MOV EAX,0x1
MOV dword ptr [EDX],0x2
MOV EDX,dword ptr [ESP + 0x4]
MOV dword ptr [EDX + 0x94],EBX
MOV EDX,dword ptr [ESP + 0x2c]
XOR EDX,dword ptr GS:[0x14]
JNZ 0x0005dfd4
ADD ESP,0x3c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [ESP + 0x14]
MOV dword ptr [EBP + 0x8],ESI
MOV dword ptr [EBP + 0xc],0x1
MOV dword ptr [EAX],0x0
XOR EAX,EAX
JMP 0x0005debb
LEA EAX,[EBX + 0x5e7c]
MOV dword ptr [ESP + 0x1c],EBP
SUB EDI,ESI
MOV dword ptr [ESP + 0x24],0x0
MOV dword ptr [ESP + 0x28],0x0
MOV EBP,EDX
MOV dword ptr [ESP + 0xc],EAX
LEA EAX,[ESP + 0x24]
MOV dword ptr [ESP + 0x18],EAX
JMP 0x0005df36
MOV EAX,0x1
SUB EDI,EAX
LEA EBX,[ESI + EAX*0x1]
TEST EDI,EDI
JLE 0x0005df78
MOV EDX,EBP
CMP CL,DL
JZ 0x0005df78
MOV ESI,EBX
MOVZX EAX,byte ptr [ESI]
MOV EBX,dword ptr [ESP + 0xc]
CMP dword ptr [EBX + EAX*0x4],-0x1
MOV ECX,EAX
JNZ 0x0005df20
MOV byte ptr [ESP + 0x13],AL
PUSH dword ptr [ESP + 0x18]
PUSH EDI
PUSH ESI
PUSH 0x0
MOV EBX,dword ptr [ESP + 0x18]
CALL 0x000140f0
LEA EBX,[EAX + -0x2]
ADD ESP,0x10
MOVZX ECX,byte ptr [ESP + 0x13]
CMP EBX,-0x5
JA 0x0005df20
SUB EDI,EAX
LEA EBX,[ESI + EAX*0x1]
TEST EDI,EDI
JG 0x0005df2e
NOP
LEA ESI,[ESI]
MOV EDX,EBP
MOV EBP,dword ptr [ESP + 0x1c]
MOV EDI,EBX
SUB EDI,dword ptr [EBP]
CMP CL,DL
JNZ 0x0005dfb0
MOV EDX,dword ptr [ESP + 0x4]
CMP dword ptr [EDX + 0x80],ESI
JBE 0x0005dfb0
SUB EDI,EAX
MOV dword ptr [EBP + 0xc],EAX
MOV EAX,dword ptr [ESP + 0x14]
MOV dword ptr [EBP + 0x4],EDI
MOV dword ptr [EBP + 0x8],ESI
MOV dword ptr [EAX],0x0
XOR EAX,EAX
JMP 0x0005debb
MOV EAX,dword ptr [ESP + 0x14]
MOV dword ptr [EBP + 0x4],EDI
MOV dword ptr [EAX],0x2
MOV EAX,dword ptr [ESP + 0x4]
SUB EBX,dword ptr [EAX + 0x7c]
MOV dword ptr [EAX + 0x94],EBX
MOV EAX,0x1
JMP 0x0005debb
CALL 0x00087be0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nundefined4 FUN_0005ddf0(int param_1,int *param_2,int *param_3)\n\n{\n  byte bVar1;\n  byte bVar2;\n  byte *pbVar3;\n  int iVar4;\n  undefined4 uVar5;\n  size_t sVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  size_t __n;\n  int in_GS_OFFSET;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar4 = DAT_000c3744;\n  uStack_14 = 0x5ddf9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_2 = 0;\n  param_2[1] = 0;\n  param_2[2] = 0;\n  param_2[3] = 0;\n  bVar2 = **(byte **)(iVar4 + 8);\n  **(byte **)(param_1 + 0x80) = bVar2;\n  iVar4 = *param_3;\n  pbVar8 = *(byte **)(param_1 + 0x7c);\n  *param_2 = (int)pbVar8;\n  pbVar7 = pbVar8;\n  if (iVar4 == 2) {\n    pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);\n  }\n  pbVar3 = *(byte **)(param_1 + 0x80);\n  if ((bVar2 == 10) || (DAT_000c49c0 < 2)) {\n    bVar1 = *pbVar7;\n    while (bVar1 != bVar2) {\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }\n    param_2[1] = (int)pbVar7 - (int)pbVar8;\n    if (pbVar7 < pbVar3) {\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }\n  }\n  else {\n    __n = (int)pbVar3 - (int)pbVar7;\n    local_28.__count = 0;\n    local_28.__value.__wch = 0;\n    do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar5;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00087be0();\n}\n\n" comment (function_definition "undefined4 FUN_0005ddf0(int param_1,int *param_2,int *param_3)\n\n{\n  byte bVar1;\n  byte bVar2;\n  byte *pbVar3;\n  int iVar4;\n  undefined4 uVar5;\n  size_t sVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  size_t __n;\n  int in_GS_OFFSET;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar4 = DAT_000c3744;\n  uStack_14 = 0x5ddf9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_2 = 0;\n  param_2[1] = 0;\n  param_2[2] = 0;\n  param_2[3] = 0;\n  bVar2 = **(byte **)(iVar4 + 8);\n  **(byte **)(param_1 + 0x80) = bVar2;\n  iVar4 = *param_3;\n  pbVar8 = *(byte **)(param_1 + 0x7c);\n  *param_2 = (int)pbVar8;\n  pbVar7 = pbVar8;\n  if (iVar4 == 2) {\n    pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);\n  }\n  pbVar3 = *(byte **)(param_1 + 0x80);\n  if ((bVar2 == 10) || (DAT_000c49c0 < 2)) {\n    bVar1 = *pbVar7;\n    while (bVar1 != bVar2) {\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }\n    param_2[1] = (int)pbVar7 - (int)pbVar8;\n    if (pbVar7 < pbVar3) {\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }\n  }\n  else {\n    __n = (int)pbVar3 - (int)pbVar7;\n    local_28.__count = 0;\n    local_28.__value.__wch = 0;\n    do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar5;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00087be0();\n}" type_identifier (function_declarator "FUN_0005ddf0(int param_1,int *param_2,int *param_3)" identifier (parameter_list "(int param_1,int *param_2,int *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  byte bVar2;\n  byte *pbVar3;\n  int iVar4;\n  undefined4 uVar5;\n  size_t sVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  size_t __n;\n  int in_GS_OFFSET;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar4 = DAT_000c3744;\n  uStack_14 = 0x5ddf9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_2 = 0;\n  param_2[1] = 0;\n  param_2[2] = 0;\n  param_2[3] = 0;\n  bVar2 = **(byte **)(iVar4 + 8);\n  **(byte **)(param_1 + 0x80) = bVar2;\n  iVar4 = *param_3;\n  pbVar8 = *(byte **)(param_1 + 0x7c);\n  *param_2 = (int)pbVar8;\n  pbVar7 = pbVar8;\n  if (iVar4 == 2) {\n    pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);\n  }\n  pbVar3 = *(byte **)(param_1 + 0x80);\n  if ((bVar2 == 10) || (DAT_000c49c0 < 2)) {\n    bVar1 = *pbVar7;\n    while (bVar1 != bVar2) {\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }\n    param_2[1] = (int)pbVar7 - (int)pbVar8;\n    if (pbVar7 < pbVar3) {\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }\n  }\n  else {\n    __n = (int)pbVar3 - (int)pbVar7;\n    local_28.__count = 0;\n    local_28.__value.__wch = 0;\n    do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar5;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00087be0();\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "mbstate_t local_28;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "iVar4 = DAT_000c3744;" (assignment_expression "iVar4 = DAT_000c3744" identifier = identifier) ;) (expression_statement "uStack_14 = 0x5ddf9;" (assignment_expression "uStack_14 = 0x5ddf9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "param_2[1] = 0;" (assignment_expression "param_2[1] = 0" (subscript_expression "param_2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_2[2] = 0;" (assignment_expression "param_2[2] = 0" (subscript_expression "param_2[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_2[3] = 0;" (assignment_expression "param_2[3] = 0" (subscript_expression "param_2[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "bVar2 = **(byte **)(iVar4 + 8);" (assignment_expression "bVar2 = **(byte **)(iVar4 + 8)" identifier = (pointer_expression "**(byte **)(iVar4 + 8)" * (pointer_expression "*(byte **)(iVar4 + 8)" * (cast_expression "(byte **)(iVar4 + 8)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar4 + 8)" ( (binary_expression "iVar4 + 8" identifier + number_literal) )))))) ;) (expression_statement "**(byte **)(param_1 + 0x80) = bVar2;" (assignment_expression "**(byte **)(param_1 + 0x80) = bVar2" (pointer_expression "**(byte **)(param_1 + 0x80)" * (pointer_expression "*(byte **)(param_1 + 0x80)" * (cast_expression "(byte **)(param_1 + 0x80)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) = identifier) ;) (expression_statement "iVar4 = *param_3;" (assignment_expression "iVar4 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (expression_statement "pbVar8 = *(byte **)(param_1 + 0x7c);" (assignment_expression "pbVar8 = *(byte **)(param_1 + 0x7c)" identifier = (pointer_expression "*(byte **)(param_1 + 0x7c)" * (cast_expression "(byte **)(param_1 + 0x7c)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x7c)" ( (binary_expression "param_1 + 0x7c" identifier + number_literal) ))))) ;) (expression_statement "*param_2 = (int)pbVar8;" (assignment_expression "*param_2 = (int)pbVar8" (pointer_expression "*param_2" * identifier) = (cast_expression "(int)pbVar8" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "pbVar7 = pbVar8;" (assignment_expression "pbVar7 = pbVar8" identifier = identifier) ;) (if_statement "if (iVar4 == 2) {\n    pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);\n  }" if (parenthesized_expression "(iVar4 == 2)" ( (binary_expression "iVar4 == 2" identifier == number_literal) )) (compound_statement "{\n    pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);\n  }" { (expression_statement "pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);" (assignment_expression "pbVar7 = pbVar8 + *(int *)(param_1 + 0x94)" identifier = (binary_expression "pbVar8 + *(int *)(param_1 + 0x94)" identifier + (pointer_expression "*(int *)(param_1 + 0x94)" * (cast_expression "(int *)(param_1 + 0x94)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x94)" ( (binary_expression "param_1 + 0x94" identifier + number_literal) )))))) ;) })) (expression_statement "pbVar3 = *(byte **)(param_1 + 0x80);" (assignment_expression "pbVar3 = *(byte **)(param_1 + 0x80)" identifier = (pointer_expression "*(byte **)(param_1 + 0x80)" * (cast_expression "(byte **)(param_1 + 0x80)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) ;) (if_statement "if ((bVar2 == 10) || (DAT_000c49c0 < 2)) {\n    bVar1 = *pbVar7;\n    while (bVar1 != bVar2) {\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }\n    param_2[1] = (int)pbVar7 - (int)pbVar8;\n    if (pbVar7 < pbVar3) {\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }\n  }\n  else {\n    __n = (int)pbVar3 - (int)pbVar7;\n    local_28.__count = 0;\n    local_28.__value.__wch = 0;\n    do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }\n  }" if (parenthesized_expression "((bVar2 == 10) || (DAT_000c49c0 < 2))" ( (binary_expression "(bVar2 == 10) || (DAT_000c49c0 < 2)" (parenthesized_expression "(bVar2 == 10)" ( (binary_expression "bVar2 == 10" identifier == number_literal) )) || (parenthesized_expression "(DAT_000c49c0 < 2)" ( (binary_expression "DAT_000c49c0 < 2" identifier < number_literal) ))) )) (compound_statement "{\n    bVar1 = *pbVar7;\n    while (bVar1 != bVar2) {\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }\n    param_2[1] = (int)pbVar7 - (int)pbVar8;\n    if (pbVar7 < pbVar3) {\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }\n  }" { (expression_statement "bVar1 = *pbVar7;" (assignment_expression "bVar1 = *pbVar7" identifier = (pointer_expression "*pbVar7" * identifier)) ;) (while_statement "while (bVar1 != bVar2) {\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }" while (parenthesized_expression "(bVar1 != bVar2)" ( (binary_expression "bVar1 != bVar2" identifier != identifier) )) (compound_statement "{\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }" { (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" identifier = (binary_expression "pbVar7 + 1" identifier + number_literal)) ;) (expression_statement "bVar1 = *pbVar7;" (assignment_expression "bVar1 = *pbVar7" identifier = (pointer_expression "*pbVar7" * identifier)) ;) })) (expression_statement "param_2[1] = (int)pbVar7 - (int)pbVar8;" (assignment_expression "param_2[1] = (int)pbVar7 - (int)pbVar8" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (binary_expression "(int)pbVar7 - (int)pbVar8" (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar8" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (pbVar7 < pbVar3) {\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }" if (parenthesized_expression "(pbVar7 < pbVar3)" ( (binary_expression "pbVar7 < pbVar3" identifier < identifier) )) (compound_statement "{\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }" { (expression_statement "param_2[2] = (int)pbVar7;" (assignment_expression "param_2[2] = (int)pbVar7" (subscript_expression "param_2[2]" identifier [ number_literal ]) = (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "param_2[3] = 1;" (assignment_expression "param_2[3] = 1" (subscript_expression "param_2[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }" else (compound_statement "{\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }" { (expression_statement "uVar5 = 1;" (assignment_expression "uVar5 = 1" identifier = number_literal) ;) (expression_statement "*param_3 = 2;" (assignment_expression "*param_3 = 2" (pointer_expression "*param_3" * identifier) = number_literal) ;) (expression_statement "*(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;" (assignment_expression "*(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8" (pointer_expression "*(int *)(param_1 + 0x94)" * (cast_expression "(int *)(param_1 + 0x94)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x94)" ( (binary_expression "param_1 + 0x94" identifier + number_literal) )))) = (binary_expression "(int)pbVar7 - (int)pbVar8" (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar8" ( (type_descriptor "int" primitive_type) ) identifier))) ;) }))) }) (else_clause "else {\n    __n = (int)pbVar3 - (int)pbVar7;\n    local_28.__count = 0;\n    local_28.__value.__wch = 0;\n    do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }\n  }" else (compound_statement "{\n    __n = (int)pbVar3 - (int)pbVar7;\n    local_28.__count = 0;\n    local_28.__value.__wch = 0;\n    do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }\n  }" { (expression_statement "__n = (int)pbVar3 - (int)pbVar7;" (assignment_expression "__n = (int)pbVar3 - (int)pbVar7" identifier = (binary_expression "(int)pbVar3 - (int)pbVar7" (cast_expression "(int)pbVar3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "local_28.__count = 0;" (assignment_expression "local_28.__count = 0" (field_expression "local_28.__count" identifier . field_identifier) = number_literal) ;) (expression_statement "local_28.__value.__wch = 0;" (assignment_expression "local_28.__value.__wch = 0" (field_expression "local_28.__value.__wch" (field_expression "local_28.__value" identifier . field_identifier) . field_identifier) = number_literal) ;) (do_statement "do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));" do (compound_statement "{\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    }" { (expression_statement "pbVar8 = pbVar7;" (assignment_expression "pbVar8 = pbVar7" identifier = identifier) ;) (expression_statement "bVar1 = *pbVar8;" (assignment_expression "bVar1 = *pbVar8" identifier = (pointer_expression "*pbVar8" * identifier)) ;) (if_statement "if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }" if (parenthesized_expression "(((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc))" ( (binary_expression "((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)" (parenthesized_expression "((&DAT_000c4b60)[bVar1] == -1)" ( (binary_expression "(&DAT_000c4b60)[bVar1] == -1" (subscript_expression "(&DAT_000c4b60)[bVar1]" (parenthesized_expression "(&DAT_000c4b60)" ( (pointer_expression "&DAT_000c4b60" & identifier) )) [ identifier ]) == number_literal) )) && (parenthesized_expression "(sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)" ( (comma_expression "sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc" (assignment_expression "sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28)" identifier = (call_expression "mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28)" identifier (argument_list "((wchar_t *)0x0,(char *)pbVar8,__n,&local_28)" ( (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(char *)pbVar8" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier , (pointer_expression "&local_28" & identifier) )))) , (binary_expression "sVar6 - 2 < 0xfffffffc" (binary_expression "sVar6 - 2" identifier - number_literal) < number_literal)) ))) )) (compound_statement "{\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }" { (expression_statement "__n = __n - sVar6;" (assignment_expression "__n = __n - sVar6" identifier = (binary_expression "__n - sVar6" identifier - identifier)) ;) (expression_statement "pbVar7 = pbVar8 + sVar6;" (assignment_expression "pbVar7 = pbVar8 + sVar6" identifier = (binary_expression "pbVar8 + sVar6" identifier + identifier)) ;) }) (else_clause "else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }" else (compound_statement "{\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }" { (expression_statement "sVar6 = 1;" (assignment_expression "sVar6 = 1" identifier = number_literal) ;) (expression_statement "__n = __n - 1;" (assignment_expression "__n = __n - 1" identifier = (binary_expression "__n - 1" identifier - number_literal)) ;) (expression_statement "pbVar7 = pbVar8 + 1;" (assignment_expression "pbVar7 = pbVar8 + 1" identifier = (binary_expression "pbVar8 + 1" identifier + number_literal)) ;) }))) }) while (parenthesized_expression "((0 < (int)__n) && (bVar1 != bVar2))" ( (binary_expression "(0 < (int)__n) && (bVar1 != bVar2)" (parenthesized_expression "(0 < (int)__n)" ( (binary_expression "0 < (int)__n" number_literal < (cast_expression "(int)__n" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "(bVar1 != bVar2)" ( (binary_expression "bVar1 != bVar2" identifier != identifier) ))) )) ;) (if_statement "if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }" if (parenthesized_expression "((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80)))" ( (binary_expression "(bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))" (parenthesized_expression "(bVar1 == bVar2)" ( (binary_expression "bVar1 == bVar2" identifier == identifier) )) && (parenthesized_expression "(pbVar8 < *(byte **)(param_1 + 0x80))" ( (binary_expression "pbVar8 < *(byte **)(param_1 + 0x80)" identifier < (pointer_expression "*(byte **)(param_1 + 0x80)" * (cast_expression "(byte **)(param_1 + 0x80)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }" { (expression_statement "param_2[3] = sVar6;" (assignment_expression "param_2[3] = sVar6" (subscript_expression "param_2[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_2[1] = ((int)pbVar7 - *param_2) - sVar6;" (assignment_expression "param_2[1] = ((int)pbVar7 - *param_2) - sVar6" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (binary_expression "((int)pbVar7 - *param_2) - sVar6" (parenthesized_expression "((int)pbVar7 - *param_2)" ( (binary_expression "(int)pbVar7 - *param_2" (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier) - (pointer_expression "*param_2" * identifier)) )) - identifier)) ;) (expression_statement "param_2[2] = (int)pbVar8;" (assignment_expression "param_2[2] = (int)pbVar8" (subscript_expression "param_2[2]" identifier [ number_literal ]) = (cast_expression "(int)pbVar8" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }" else (compound_statement "{\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }" { (expression_statement "param_2[1] = (int)pbVar7 - *param_2;" (assignment_expression "param_2[1] = (int)pbVar7 - *param_2" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (binary_expression "(int)pbVar7 - *param_2" (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier) - (pointer_expression "*param_2" * identifier))) ;) (expression_statement "*param_3 = 2;" (assignment_expression "*param_3 = 2" (pointer_expression "*param_3" * identifier) = number_literal) ;) (expression_statement "*(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);" (assignment_expression "*(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c)" (pointer_expression "*(int *)(param_1 + 0x94)" * (cast_expression "(int *)(param_1 + 0x94)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x94)" ( (binary_expression "param_1 + 0x94" identifier + number_literal) )))) = (binary_expression "(int)pbVar7 - *(int *)(param_1 + 0x7c)" (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier) - (pointer_expression "*(int *)(param_1 + 0x7c)" * (cast_expression "(int *)(param_1 + 0x7c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x7c)" ( (binary_expression "param_1 + 0x7c" identifier + number_literal) )))))) ;) (expression_statement "uVar5 = 1;" (assignment_expression "uVar5 = 1" identifier = number_literal) ;) }))) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar5;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar5;\n  }" { (return_statement "return uVar5;" return identifier ;) })) comment (expression_statement "FUN_00087be0();" (call_expression "FUN_00087be0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n/* WARNING: Unknown calling convention */\n\nRECVALUE rs1scan(IOBUF *iop,recmatch *recm,SCANSTATE *state)\n\n{\n  byte bVar1;\n  byte bVar2;\n  int iVar3;\n  byte *pbVar4;\n  SCANSTATE SVar5;\n  NODE *pNVar6;\n  RECVALUE RVar7;\n  size_t sVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  size_t __n;\n  size_t sVar11;\n  int in_GS_OFFSET;\n  mbstate_t mbs;\n  \n  pNVar6 = RS;\n  iVar3 = *(int *)(in_GS_OFFSET + 0x14);\n  recm->start = (char *)0x0;\n  recm->len = 0;\n  recm->rt_start = (char *)0x0;\n  recm->rt_len = 0;\n  bVar2 = *(pNVar6->sub).val.sp;\n  *iop->dataend = bVar2;\n  SVar5 = *state;\n  pbVar10 = (byte *)iop->off;\n  recm->start = (char *)pbVar10;\n  pbVar9 = pbVar10;\n  if (SVar5 == INDATA) {\n    pbVar9 = pbVar10 + iop->scanoff;\n  }\n  pbVar4 = (byte *)iop->dataend;\n  if ((bVar2 == 10) || (gawk_mb_cur_max < 2)) {\n    bVar1 = *pbVar9;\n    while (bVar1 != bVar2) {\n      pbVar9 = pbVar9 + 1;\n      bVar1 = *pbVar9;\n    }\n    recm->len = (int)pbVar9 - (int)pbVar10;\n    if (pbVar9 < pbVar4) {\n      recm->rt_start = (char *)pbVar9;\n      recm->rt_len = 1;\n      *state = NOSTATE;\n      RVar7 = REC_OK;\n    }\n    else {\n      RVar7 = NOTERM;\n      *state = INDATA;\n      iop->scanoff = (int)pbVar9 - (int)pbVar10;\n    }\n  }\n  else {\n    __n = (int)pbVar4 - (int)pbVar9;\n    mbs.__count = 0;\n    mbs.__value.__wch = 0;\n    do {\n      pbVar10 = pbVar9;\n      bVar1 = *pbVar10;\n      if (((&btowc_cache)[bVar1] == -1) &&\n         (sVar8 = mbrtowc((wchar_t *)0x0,(char *)pbVar10,__n,(mbstate_t *)&mbs),\n         sVar8 - 2 < 0xfffffffc)) {\n        __n = __n - sVar8;\n        pbVar9 = pbVar10 + sVar8;\n      }\n      else {\n        sVar8 = 1;\n        __n = __n - 1;\n        pbVar9 = pbVar10 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    sVar11 = (int)pbVar9 - (int)recm->start;\n    if ((bVar1 == bVar2) && (pbVar10 < iop->dataend)) {\n      recm->rt_len = sVar8;\n      recm->len = sVar11 - sVar8;\n      recm->rt_start = (char *)pbVar10;\n      *state = NOSTATE;\n      RVar7 = REC_OK;\n    }\n    else {\n      recm->len = sVar11;\n      *state = INDATA;\n      iop->scanoff = (int)pbVar9 - (int)iop->off;\n      RVar7 = NOTERM;\n    }\n  }\n  if (iVar3 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return RVar7;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "RECVALUE rs1scan(IOBUF *iop,recmatch *recm,SCANSTATE *state)\n\n{\n  byte bVar1;\n  byte bVar2;\n  int iVar3;\n  byte *pbVar4;\n  SCANSTATE SVar5;\n  NODE *pNVar6;\n  RECVALUE RVar7;\n  size_t sVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  size_t __n;\n  size_t sVar11;\n  int in_GS_OFFSET;\n  mbstate_t mbs;\n  \n  pNVar6 = RS;\n  iVar3 = *(int *)(in_GS_OFFSET + 0x14);\n  recm->start = (char *)0x0;\n  recm->len = 0;\n  recm->rt_start = (char *)0x0;\n  recm->rt_len = 0;\n  bVar2 = *(pNVar6->sub).val.sp;\n  *iop->dataend = bVar2;\n  SVar5 = *state;\n  pbVar10 = (byte *)iop->off;\n  recm->start = (char *)pbVar10;\n  pbVar9 = pbVar10;\n  if (SVar5 == INDATA) {\n    pbVar9 = pbVar10 + iop->scanoff;\n  }\n  pbVar4 = (byte *)iop->dataend;\n  if ((bVar2 == 10) || (gawk_mb_cur_max < 2)) {\n    bVar1 = *pbVar9;\n    while (bVar1 != bVar2) {\n      pbVar9 = pbVar9 + 1;\n      bVar1 = *pbVar9;\n    }\n    recm->len = (int)pbVar9 - (int)pbVar10;\n    if (pbVar9 < pbVar4) {\n      recm->rt_start = (char *)pbVar9;\n      recm->rt_len = 1;\n      *state = NOSTATE;\n      RVar7 = REC_OK;\n    }\n    else {\n      RVar7 = NOTERM;\n      *state = INDATA;\n      iop->scanoff = (int)pbVar9 - (int)pbVar10;\n    }\n  }\n  else {\n    __n = (int)pbVar4 - (int)pbVar9;\n    mbs.__count = 0;\n    mbs.__value.__wch = 0;\n    do {\n      pbVar10 = pbVar9;\n      bVar1 = *pbVar10;\n      if (((&btowc_cache)[bVar1] == -1) &&\n         (sVar8 = mbrtowc((wchar_t *)0x0,(char *)pbVar10,__n,(mbstate_t *)&mbs),\n         sVar8 - 2 < 0xfffffffc)) {\n        __n = __n - sVar8;\n        pbVar9 = pbVar10 + sVar8;\n      }\n      else {\n        sVar8 = 1;\n        __n = __n - 1;\n        pbVar9 = pbVar10 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    sVar11 = (int)pbVar9 - (int)recm->start;\n    if ((bVar1 == bVar2) && (pbVar10 < iop->dataend)) {\n      recm->rt_len = sVar8;\n      recm->len = sVar11 - sVar8;\n      recm->rt_start = (char *)pbVar10;\n      *state = NOSTATE;\n      RVar7 = REC_OK;\n    }\n    else {\n      recm->len = sVar11;\n      *state = INDATA;\n      iop->scanoff = (int)pbVar9 - (int)iop->off;\n      RVar7 = NOTERM;\n    }\n  }\n  if (iVar3 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return RVar7;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" type_identifier (function_declarator "rs1scan(IOBUF *iop,recmatch *recm,SCANSTATE *state)" identifier (parameter_list "(IOBUF *iop,recmatch *recm,SCANSTATE *state)" ( (parameter_declaration "IOBUF *iop" type_identifier (pointer_declarator "*iop" * identifier)) , (parameter_declaration "recmatch *recm" type_identifier (pointer_declarator "*recm" * identifier)) , (parameter_declaration "SCANSTATE *state" type_identifier (pointer_declarator "*state" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  byte bVar2;\n  int iVar3;\n  byte *pbVar4;\n  SCANSTATE SVar5;\n  NODE *pNVar6;\n  RECVALUE RVar7;\n  size_t sVar8;\n  byte *pbVar9;\n  byte *pbVar10;\n  size_t __n;\n  size_t sVar11;\n  int in_GS_OFFSET;\n  mbstate_t mbs;\n  \n  pNVar6 = RS;\n  iVar3 = *(int *)(in_GS_OFFSET + 0x14);\n  recm->start = (char *)0x0;\n  recm->len = 0;\n  recm->rt_start = (char *)0x0;\n  recm->rt_len = 0;\n  bVar2 = *(pNVar6->sub).val.sp;\n  *iop->dataend = bVar2;\n  SVar5 = *state;\n  pbVar10 = (byte *)iop->off;\n  recm->start = (char *)pbVar10;\n  pbVar9 = pbVar10;\n  if (SVar5 == INDATA) {\n    pbVar9 = pbVar10 + iop->scanoff;\n  }\n  pbVar4 = (byte *)iop->dataend;\n  if ((bVar2 == 10) || (gawk_mb_cur_max < 2)) {\n    bVar1 = *pbVar9;\n    while (bVar1 != bVar2) {\n      pbVar9 = pbVar9 + 1;\n      bVar1 = *pbVar9;\n    }\n    recm->len = (int)pbVar9 - (int)pbVar10;\n    if (pbVar9 < pbVar4) {\n      recm->rt_start = (char *)pbVar9;\n      recm->rt_len = 1;\n      *state = NOSTATE;\n      RVar7 = REC_OK;\n    }\n    else {\n      RVar7 = NOTERM;\n      *state = INDATA;\n      iop->scanoff = (int)pbVar9 - (int)pbVar10;\n    }\n  }\n  else {\n    __n = (int)pbVar4 - (int)pbVar9;\n    mbs.__count = 0;\n    mbs.__value.__wch = 0;\n    do {\n      pbVar10 = pbVar9;\n      bVar1 = *pbVar10;\n      if (((&btowc_cache)[bVar1] == -1) &&\n         (sVar8 = mbrtowc((wchar_t *)0x0,(char *)pbVar10,__n,(mbstate_t *)&mbs),\n         sVar8 - 2 < 0xfffffffc)) {\n        __n = __n - sVar8;\n        pbVar9 = pbVar10 + sVar8;\n      }\n      else {\n        sVar8 = 1;\n        __n = __n - 1;\n        pbVar9 = pbVar10 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    sVar11 = (int)pbVar9 - (int)recm->start;\n    if ((bVar1 == bVar2) && (pbVar10 < iop->dataend)) {\n      recm->rt_len = sVar8;\n      recm->len = sVar11 - sVar8;\n      recm->rt_start = (char *)pbVar10;\n      *state = NOSTATE;\n      RVar7 = REC_OK;\n    }\n    else {\n      recm->len = sVar11;\n      *state = INDATA;\n      iop->scanoff = (int)pbVar9 - (int)iop->off;\n      RVar7 = NOTERM;\n    }\n  }\n  if (iVar3 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return RVar7;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "SCANSTATE SVar5;" type_identifier identifier ;) (declaration "NODE *pNVar6;" type_identifier (pointer_declarator "*pNVar6" * identifier) ;) (declaration "RECVALUE RVar7;" type_identifier identifier ;) (declaration "size_t sVar8;" primitive_type identifier ;) (declaration "byte *pbVar9;" type_identifier (pointer_declarator "*pbVar9" * identifier) ;) (declaration "byte *pbVar10;" type_identifier (pointer_declarator "*pbVar10" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t sVar11;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "mbstate_t mbs;" type_identifier identifier ;) (expression_statement "pNVar6 = RS;" (assignment_expression "pNVar6 = RS" identifier = identifier) ;) (expression_statement "iVar3 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar3 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "recm->start = (char *)0x0;" (assignment_expression "recm->start = (char *)0x0" (field_expression "recm->start" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "recm->len = 0;" (assignment_expression "recm->len = 0" (field_expression "recm->len" identifier -> field_identifier) = number_literal) ;) (expression_statement "recm->rt_start = (char *)0x0;" (assignment_expression "recm->rt_start = (char *)0x0" (field_expression "recm->rt_start" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "recm->rt_len = 0;" (assignment_expression "recm->rt_len = 0" (field_expression "recm->rt_len" identifier -> field_identifier) = number_literal) ;) (expression_statement "bVar2 = *(pNVar6->sub).val.sp;" (assignment_expression "bVar2 = *(pNVar6->sub).val.sp" identifier = (pointer_expression "*(pNVar6->sub).val.sp" * (field_expression "(pNVar6->sub).val.sp" (field_expression "(pNVar6->sub).val" (parenthesized_expression "(pNVar6->sub)" ( (field_expression "pNVar6->sub" identifier -> field_identifier) )) . field_identifier) . field_identifier))) ;) (expression_statement "*iop->dataend = bVar2;" (assignment_expression "*iop->dataend = bVar2" (pointer_expression "*iop->dataend" * (field_expression "iop->dataend" identifier -> field_identifier)) = identifier) ;) (expression_statement "SVar5 = *state;" (assignment_expression "SVar5 = *state" identifier = (pointer_expression "*state" * identifier)) ;) (expression_statement "pbVar10 = (byte *)iop->off;" (assignment_expression "pbVar10 = (byte *)iop->off" identifier = (cast_expression "(byte *)iop->off" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "iop->off" identifier -> field_identifier))) ;) (expression_statement "recm->start = (char *)pbVar10;" (assignment_expression "recm->start = (char *)pbVar10" (field_expression "recm->start" identifier -> field_identifier) = (cast_expression "(char *)pbVar10" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "pbVar9 = pbVar10;" (assignment_expression "pbVar9 = pbVar10" identifier = identifier) ;) (if_statement "if (SVar5 == INDATA) {\n    pbVar9 = pbVar10 + iop->scanoff;\n  }" if (parenthesized_expression "(SVar5 == INDATA)" ( (binary_expression "SVar5 == INDATA" identifier == identifier) )) (compound_statement "{\n    pbVar9 = pbVar10 + iop->scanoff;\n  }" { (expression_statement "pbVar9 = pbVar10 + iop->scanoff;" (assignment_expression "pbVar9 = pbVar10 + iop->scanoff" identifier = (binary_expression "pbVar10 + iop->scanoff" identifier + (field_expression "iop->scanoff" identifier -> field_identifier))) ;) })) (expression_statement "pbVar4 = (byte *)iop->dataend;" (assignment_expression "pbVar4 = (byte *)iop->dataend" identifier = (cast_expression "(byte *)iop->dataend" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "iop->dataend" identifier -> field_identifier))) ;) (if_statement "if ((bVar2 == 10) || (gawk_mb_cur_max < 2)) {\n    bVar1 = *pbVar9;\n    while (bVar1 != bVar2) {\n      pbVar9 = pbVar9 + 1;\n      bVar1 = *pbVar9;\n    }\n    recm->len = (int)pbVar9 - (int)pbVar10;\n    if (pbVar9 < pbVar4) {\n      recm->rt_start = (char *)pbVar9;\n      recm->rt_len = 1;\n      *state = NOSTATE;\n      RVar7 = REC_OK;\n    }\n    else {\n      RVar7 = NOTERM;\n      *state = INDATA;\n      iop->scanoff = (int)pbVar9 - (int)pbVar10;\n    }\n  }\n  else {\n    __n = (int)pbVar4 - (int)pbVar9;\n    mbs.__count = 0;\n    mbs.__value.__wch = 0;\n    do {\n      pbVar10 = pbVar9;\n      bVar1 = *pbVar10;\n      if (((&btowc_cache)[bVar1] == -1) &&\n         (sVar8 = mbrtowc((wchar_t *)0x0,(char *)pbVar10,__n,(mbstate_t *)&mbs),\n         sVar8 - 2 < 0xfffffffc)) {\n        __n = __n - sVar8;\n        pbVar9 = pbVar10 + sVar8;\n      }\n      else {\n        sVar8 = 1;\n        __n = __n - 1;\n        pbVar9 = pbVar10 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    sVar11 = (int)pbVar9 - (int)recm->start;\n    if ((bVar1 == bVar2) && (pbVar10 < iop->dataend)) {\n      recm->rt_len = sVar8;\n      recm->len = sVar11 - sVar8;\n      recm->rt_start = (char *)pbVar10;\n      *state = NOSTATE;\n      RVar7 = REC_OK;\n    }\n    else {\n      recm->len = sVar11;\n      *state = INDATA;\n      iop->scanoff = (int)pbVar9 - (int)iop->off;\n      RVar7 = NOTERM;\n    }\n  }" if (parenthesized_expression "((bVar2 == 10) || (gawk_mb_cur_max < 2))" ( (binary_expression "(bVar2 == 10) || (gawk_mb_cur_max < 2)" (parenthesized_expression "(bVar2 == 10)" ( (binary_expression "bVar2 == 10" identifier == number_literal) )) || (parenthesized_expression "(gawk_mb_cur_max < 2)" ( (binary_expression "gawk_mb_cur_max < 2" identifier < number_literal) ))) )) (compound_statement "{\n    bVar1 = *pbVar9;\n    while (bVar1 != bVar2) {\n      pbVar9 = pbVar9 + 1;\n      bVar1 = *pbVar9;\n    }\n    recm->len = (int)pbVar9 - (int)pbVar10;\n    if (pbVar9 < pbVar4) {\n      recm->rt_start = (char *)pbVar9;\n      recm->rt_len = 1;\n      *state = NOSTATE;\n      RVar7 = REC_OK;\n    }\n    else {\n      RVar7 = NOTERM;\n      *state = INDATA;\n      iop->scanoff = (int)pbVar9 - (int)pbVar10;\n    }\n  }" { (expression_statement "bVar1 = *pbVar9;" (assignment_expression "bVar1 = *pbVar9" identifier = (pointer_expression "*pbVar9" * identifier)) ;) (while_statement "while (bVar1 != bVar2) {\n      pbVar9 = pbVar9 + 1;\n      bVar1 = *pbVar9;\n    }" while (parenthesized_expression "(bVar1 != bVar2)" ( (binary_expression "bVar1 != bVar2" identifier != identifier) )) (compound_statement "{\n      pbVar9 = pbVar9 + 1;\n      bVar1 = *pbVar9;\n    }" { (expression_statement "pbVar9 = pbVar9 + 1;" (assignment_expression "pbVar9 = pbVar9 + 1" identifier = (binary_expression "pbVar9 + 1" identifier + number_literal)) ;) (expression_statement "bVar1 = *pbVar9;" (assignment_expression "bVar1 = *pbVar9" identifier = (pointer_expression "*pbVar9" * identifier)) ;) })) (expression_statement "recm->len = (int)pbVar9 - (int)pbVar10;" (assignment_expression "recm->len = (int)pbVar9 - (int)pbVar10" (field_expression "recm->len" identifier -> field_identifier) = (binary_expression "(int)pbVar9 - (int)pbVar10" (cast_expression "(int)pbVar9" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar10" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (pbVar9 < pbVar4) {\n      recm->rt_start = (char *)pbVar9;\n      recm->rt_len = 1;\n      *state = NOSTATE;\n      RVar7 = REC_OK;\n    }\n    else {\n      RVar7 = NOTERM;\n      *state = INDATA;\n      iop->scanoff = (int)pbVar9 - (int)pbVar10;\n    }" if (parenthesized_expression "(pbVar9 < pbVar4)" ( (binary_expression "pbVar9 < pbVar4" identifier < identifier) )) (compound_statement "{\n      recm->rt_start = (char *)pbVar9;\n      recm->rt_len = 1;\n      *state = NOSTATE;\n      RVar7 = REC_OK;\n    }" { (expression_statement "recm->rt_start = (char *)pbVar9;" (assignment_expression "recm->rt_start = (char *)pbVar9" (field_expression "recm->rt_start" identifier -> field_identifier) = (cast_expression "(char *)pbVar9" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "recm->rt_len = 1;" (assignment_expression "recm->rt_len = 1" (field_expression "recm->rt_len" identifier -> field_identifier) = number_literal) ;) (expression_statement "*state = NOSTATE;" (assignment_expression "*state = NOSTATE" (pointer_expression "*state" * identifier) = identifier) ;) (expression_statement "RVar7 = REC_OK;" (assignment_expression "RVar7 = REC_OK" identifier = identifier) ;) }) (else_clause "else {\n      RVar7 = NOTERM;\n      *state = INDATA;\n      iop->scanoff = (int)pbVar9 - (int)pbVar10;\n    }" else (compound_statement "{\n      RVar7 = NOTERM;\n      *state = INDATA;\n      iop->scanoff = (int)pbVar9 - (int)pbVar10;\n    }" { (expression_statement "RVar7 = NOTERM;" (assignment_expression "RVar7 = NOTERM" identifier = identifier) ;) (expression_statement "*state = INDATA;" (assignment_expression "*state = INDATA" (pointer_expression "*state" * identifier) = identifier) ;) (expression_statement "iop->scanoff = (int)pbVar9 - (int)pbVar10;" (assignment_expression "iop->scanoff = (int)pbVar9 - (int)pbVar10" (field_expression "iop->scanoff" identifier -> field_identifier) = (binary_expression "(int)pbVar9 - (int)pbVar10" (cast_expression "(int)pbVar9" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar10" ( (type_descriptor "int" primitive_type) ) identifier))) ;) }))) }) (else_clause "else {\n    __n = (int)pbVar4 - (int)pbVar9;\n    mbs.__count = 0;\n    mbs.__value.__wch = 0;\n    do {\n      pbVar10 = pbVar9;\n      bVar1 = *pbVar10;\n      if (((&btowc_cache)[bVar1] == -1) &&\n         (sVar8 = mbrtowc((wchar_t *)0x0,(char *)pbVar10,__n,(mbstate_t *)&mbs),\n         sVar8 - 2 < 0xfffffffc)) {\n        __n = __n - sVar8;\n        pbVar9 = pbVar10 + sVar8;\n      }\n      else {\n        sVar8 = 1;\n        __n = __n - 1;\n        pbVar9 = pbVar10 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    sVar11 = (int)pbVar9 - (int)recm->start;\n    if ((bVar1 == bVar2) && (pbVar10 < iop->dataend)) {\n      recm->rt_len = sVar8;\n      recm->len = sVar11 - sVar8;\n      recm->rt_start = (char *)pbVar10;\n      *state = NOSTATE;\n      RVar7 = REC_OK;\n    }\n    else {\n      recm->len = sVar11;\n      *state = INDATA;\n      iop->scanoff = (int)pbVar9 - (int)iop->off;\n      RVar7 = NOTERM;\n    }\n  }" else (compound_statement "{\n    __n = (int)pbVar4 - (int)pbVar9;\n    mbs.__count = 0;\n    mbs.__value.__wch = 0;\n    do {\n      pbVar10 = pbVar9;\n      bVar1 = *pbVar10;\n      if (((&btowc_cache)[bVar1] == -1) &&\n         (sVar8 = mbrtowc((wchar_t *)0x0,(char *)pbVar10,__n,(mbstate_t *)&mbs),\n         sVar8 - 2 < 0xfffffffc)) {\n        __n = __n - sVar8;\n        pbVar9 = pbVar10 + sVar8;\n      }\n      else {\n        sVar8 = 1;\n        __n = __n - 1;\n        pbVar9 = pbVar10 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    sVar11 = (int)pbVar9 - (int)recm->start;\n    if ((bVar1 == bVar2) && (pbVar10 < iop->dataend)) {\n      recm->rt_len = sVar8;\n      recm->len = sVar11 - sVar8;\n      recm->rt_start = (char *)pbVar10;\n      *state = NOSTATE;\n      RVar7 = REC_OK;\n    }\n    else {\n      recm->len = sVar11;\n      *state = INDATA;\n      iop->scanoff = (int)pbVar9 - (int)iop->off;\n      RVar7 = NOTERM;\n    }\n  }" { (expression_statement "__n = (int)pbVar4 - (int)pbVar9;" (assignment_expression "__n = (int)pbVar4 - (int)pbVar9" identifier = (binary_expression "(int)pbVar4 - (int)pbVar9" (cast_expression "(int)pbVar4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar9" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "mbs.__count = 0;" (assignment_expression "mbs.__count = 0" (field_expression "mbs.__count" identifier . field_identifier) = number_literal) ;) (expression_statement "mbs.__value.__wch = 0;" (assignment_expression "mbs.__value.__wch = 0" (field_expression "mbs.__value.__wch" (field_expression "mbs.__value" identifier . field_identifier) . field_identifier) = number_literal) ;) (do_statement "do {\n      pbVar10 = pbVar9;\n      bVar1 = *pbVar10;\n      if (((&btowc_cache)[bVar1] == -1) &&\n         (sVar8 = mbrtowc((wchar_t *)0x0,(char *)pbVar10,__n,(mbstate_t *)&mbs),\n         sVar8 - 2 < 0xfffffffc)) {\n        __n = __n - sVar8;\n        pbVar9 = pbVar10 + sVar8;\n      }\n      else {\n        sVar8 = 1;\n        __n = __n - 1;\n        pbVar9 = pbVar10 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));" do (compound_statement "{\n      pbVar10 = pbVar9;\n      bVar1 = *pbVar10;\n      if (((&btowc_cache)[bVar1] == -1) &&\n         (sVar8 = mbrtowc((wchar_t *)0x0,(char *)pbVar10,__n,(mbstate_t *)&mbs),\n         sVar8 - 2 < 0xfffffffc)) {\n        __n = __n - sVar8;\n        pbVar9 = pbVar10 + sVar8;\n      }\n      else {\n        sVar8 = 1;\n        __n = __n - 1;\n        pbVar9 = pbVar10 + 1;\n      }\n    }" { (expression_statement "pbVar10 = pbVar9;" (assignment_expression "pbVar10 = pbVar9" identifier = identifier) ;) (expression_statement "bVar1 = *pbVar10;" (assignment_expression "bVar1 = *pbVar10" identifier = (pointer_expression "*pbVar10" * identifier)) ;) (if_statement "if (((&btowc_cache)[bVar1] == -1) &&\n         (sVar8 = mbrtowc((wchar_t *)0x0,(char *)pbVar10,__n,(mbstate_t *)&mbs),\n         sVar8 - 2 < 0xfffffffc)) {\n        __n = __n - sVar8;\n        pbVar9 = pbVar10 + sVar8;\n      }\n      else {\n        sVar8 = 1;\n        __n = __n - 1;\n        pbVar9 = pbVar10 + 1;\n      }" if (parenthesized_expression "(((&btowc_cache)[bVar1] == -1) &&\n         (sVar8 = mbrtowc((wchar_t *)0x0,(char *)pbVar10,__n,(mbstate_t *)&mbs),\n         sVar8 - 2 < 0xfffffffc))" ( (binary_expression "((&btowc_cache)[bVar1] == -1) &&\n         (sVar8 = mbrtowc((wchar_t *)0x0,(char *)pbVar10,__n,(mbstate_t *)&mbs),\n         sVar8 - 2 < 0xfffffffc)" (parenthesized_expression "((&btowc_cache)[bVar1] == -1)" ( (binary_expression "(&btowc_cache)[bVar1] == -1" (subscript_expression "(&btowc_cache)[bVar1]" (parenthesized_expression "(&btowc_cache)" ( (pointer_expression "&btowc_cache" & identifier) )) [ identifier ]) == number_literal) )) && (parenthesized_expression "(sVar8 = mbrtowc((wchar_t *)0x0,(char *)pbVar10,__n,(mbstate_t *)&mbs),\n         sVar8 - 2 < 0xfffffffc)" ( (comma_expression "sVar8 = mbrtowc((wchar_t *)0x0,(char *)pbVar10,__n,(mbstate_t *)&mbs),\n         sVar8 - 2 < 0xfffffffc" (assignment_expression "sVar8 = mbrtowc((wchar_t *)0x0,(char *)pbVar10,__n,(mbstate_t *)&mbs)" identifier = (call_expression "mbrtowc((wchar_t *)0x0,(char *)pbVar10,__n,(mbstate_t *)&mbs)" identifier (argument_list "((wchar_t *)0x0,(char *)pbVar10,__n,(mbstate_t *)&mbs)" ( (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(char *)pbVar10" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier , (cast_expression "(mbstate_t *)&mbs" ( (type_descriptor "mbstate_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&mbs" & identifier)) )))) , (binary_expression "sVar8 - 2 < 0xfffffffc" (binary_expression "sVar8 - 2" identifier - number_literal) < number_literal)) ))) )) (compound_statement "{\n        __n = __n - sVar8;\n        pbVar9 = pbVar10 + sVar8;\n      }" { (expression_statement "__n = __n - sVar8;" (assignment_expression "__n = __n - sVar8" identifier = (binary_expression "__n - sVar8" identifier - identifier)) ;) (expression_statement "pbVar9 = pbVar10 + sVar8;" (assignment_expression "pbVar9 = pbVar10 + sVar8" identifier = (binary_expression "pbVar10 + sVar8" identifier + identifier)) ;) }) (else_clause "else {\n        sVar8 = 1;\n        __n = __n - 1;\n        pbVar9 = pbVar10 + 1;\n      }" else (compound_statement "{\n        sVar8 = 1;\n        __n = __n - 1;\n        pbVar9 = pbVar10 + 1;\n      }" { (expression_statement "sVar8 = 1;" (assignment_expression "sVar8 = 1" identifier = number_literal) ;) (expression_statement "__n = __n - 1;" (assignment_expression "__n = __n - 1" identifier = (binary_expression "__n - 1" identifier - number_literal)) ;) (expression_statement "pbVar9 = pbVar10 + 1;" (assignment_expression "pbVar9 = pbVar10 + 1" identifier = (binary_expression "pbVar10 + 1" identifier + number_literal)) ;) }))) }) while (parenthesized_expression "((0 < (int)__n) && (bVar1 != bVar2))" ( (binary_expression "(0 < (int)__n) && (bVar1 != bVar2)" (parenthesized_expression "(0 < (int)__n)" ( (binary_expression "0 < (int)__n" number_literal < (cast_expression "(int)__n" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "(bVar1 != bVar2)" ( (binary_expression "bVar1 != bVar2" identifier != identifier) ))) )) ;) (expression_statement "sVar11 = (int)pbVar9 - (int)recm->start;" (assignment_expression "sVar11 = (int)pbVar9 - (int)recm->start" identifier = (binary_expression "(int)pbVar9 - (int)recm->start" (cast_expression "(int)pbVar9" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)recm->start" ( (type_descriptor "int" primitive_type) ) (field_expression "recm->start" identifier -> field_identifier)))) ;) (if_statement "if ((bVar1 == bVar2) && (pbVar10 < iop->dataend)) {\n      recm->rt_len = sVar8;\n      recm->len = sVar11 - sVar8;\n      recm->rt_start = (char *)pbVar10;\n      *state = NOSTATE;\n      RVar7 = REC_OK;\n    }\n    else {\n      recm->len = sVar11;\n      *state = INDATA;\n      iop->scanoff = (int)pbVar9 - (int)iop->off;\n      RVar7 = NOTERM;\n    }" if (parenthesized_expression "((bVar1 == bVar2) && (pbVar10 < iop->dataend))" ( (binary_expression "(bVar1 == bVar2) && (pbVar10 < iop->dataend)" (parenthesized_expression "(bVar1 == bVar2)" ( (binary_expression "bVar1 == bVar2" identifier == identifier) )) && (parenthesized_expression "(pbVar10 < iop->dataend)" ( (binary_expression "pbVar10 < iop->dataend" identifier < (field_expression "iop->dataend" identifier -> field_identifier)) ))) )) (compound_statement "{\n      recm->rt_len = sVar8;\n      recm->len = sVar11 - sVar8;\n      recm->rt_start = (char *)pbVar10;\n      *state = NOSTATE;\n      RVar7 = REC_OK;\n    }" { (expression_statement "recm->rt_len = sVar8;" (assignment_expression "recm->rt_len = sVar8" (field_expression "recm->rt_len" identifier -> field_identifier) = identifier) ;) (expression_statement "recm->len = sVar11 - sVar8;" (assignment_expression "recm->len = sVar11 - sVar8" (field_expression "recm->len" identifier -> field_identifier) = (binary_expression "sVar11 - sVar8" identifier - identifier)) ;) (expression_statement "recm->rt_start = (char *)pbVar10;" (assignment_expression "recm->rt_start = (char *)pbVar10" (field_expression "recm->rt_start" identifier -> field_identifier) = (cast_expression "(char *)pbVar10" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "*state = NOSTATE;" (assignment_expression "*state = NOSTATE" (pointer_expression "*state" * identifier) = identifier) ;) (expression_statement "RVar7 = REC_OK;" (assignment_expression "RVar7 = REC_OK" identifier = identifier) ;) }) (else_clause "else {\n      recm->len = sVar11;\n      *state = INDATA;\n      iop->scanoff = (int)pbVar9 - (int)iop->off;\n      RVar7 = NOTERM;\n    }" else (compound_statement "{\n      recm->len = sVar11;\n      *state = INDATA;\n      iop->scanoff = (int)pbVar9 - (int)iop->off;\n      RVar7 = NOTERM;\n    }" { (expression_statement "recm->len = sVar11;" (assignment_expression "recm->len = sVar11" (field_expression "recm->len" identifier -> field_identifier) = identifier) ;) (expression_statement "*state = INDATA;" (assignment_expression "*state = INDATA" (pointer_expression "*state" * identifier) = identifier) ;) (expression_statement "iop->scanoff = (int)pbVar9 - (int)iop->off;" (assignment_expression "iop->scanoff = (int)pbVar9 - (int)iop->off" (field_expression "iop->scanoff" identifier -> field_identifier) = (binary_expression "(int)pbVar9 - (int)iop->off" (cast_expression "(int)pbVar9" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)iop->off" ( (type_descriptor "int" primitive_type) ) (field_expression "iop->off" identifier -> field_identifier)))) ;) (expression_statement "RVar7 = NOTERM;" (assignment_expression "RVar7 = NOTERM" identifier = identifier) ;) }))) }))) (if_statement "if (iVar3 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return RVar7;\n  }" if (parenthesized_expression "(iVar3 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar3 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return RVar7;\n  }" { (return_statement "return RVar7;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "undefined4 FUN_0005ddf0(int param_1,int *param_2,int *param_3)\n\n{\n  byte bVar1;\n  byte bVar2;\n  byte *pbVar3;\n  int iVar4;\n  undefined4 uVar5;\n  size_t sVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  size_t __n;\n  int in_GS_OFFSET;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar4 = DAT_000c3744;\n  uStack_14 = 0x5ddf9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_2 = 0;\n  param_2[1] = 0;\n  param_2[2] = 0;\n  param_2[3] = 0;\n  bVar2 = **(byte **)(iVar4 + 8);\n  **(byte **)(param_1 + 0x80) = bVar2;\n  iVar4 = *param_3;\n  pbVar8 = *(byte **)(param_1 + 0x7c);\n  *param_2 = (int)pbVar8;\n  pbVar7 = pbVar8;\n  if (iVar4 == 2) {\n    pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);\n  }\n  pbVar3 = *(byte **)(param_1 + 0x80);\n  if ((bVar2 == 10) || (DAT_000c49c0 < 2)) {\n    bVar1 = *pbVar7;\n    while (bVar1 != bVar2) {\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }\n    param_2[1] = (int)pbVar7 - (int)pbVar8;\n    if (pbVar7 < pbVar3) {\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }\n  }\n  else {\n    __n = (int)pbVar3 - (int)pbVar7;\n    local_28.__count = 0;\n    local_28.__value.__wch = 0;\n    do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar5;\n  }\n                    \n  FUN_00087be0();\n}\n\n" (function_definition "undefined4 FUN_0005ddf0(int param_1,int *param_2,int *param_3)\n\n{\n  byte bVar1;\n  byte bVar2;\n  byte *pbVar3;\n  int iVar4;\n  undefined4 uVar5;\n  size_t sVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  size_t __n;\n  int in_GS_OFFSET;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar4 = DAT_000c3744;\n  uStack_14 = 0x5ddf9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_2 = 0;\n  param_2[1] = 0;\n  param_2[2] = 0;\n  param_2[3] = 0;\n  bVar2 = **(byte **)(iVar4 + 8);\n  **(byte **)(param_1 + 0x80) = bVar2;\n  iVar4 = *param_3;\n  pbVar8 = *(byte **)(param_1 + 0x7c);\n  *param_2 = (int)pbVar8;\n  pbVar7 = pbVar8;\n  if (iVar4 == 2) {\n    pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);\n  }\n  pbVar3 = *(byte **)(param_1 + 0x80);\n  if ((bVar2 == 10) || (DAT_000c49c0 < 2)) {\n    bVar1 = *pbVar7;\n    while (bVar1 != bVar2) {\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }\n    param_2[1] = (int)pbVar7 - (int)pbVar8;\n    if (pbVar7 < pbVar3) {\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }\n  }\n  else {\n    __n = (int)pbVar3 - (int)pbVar7;\n    local_28.__count = 0;\n    local_28.__value.__wch = 0;\n    do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar5;\n  }\n                    \n  FUN_00087be0();\n}" type_identifier (function_declarator "FUN_0005ddf0(int param_1,int *param_2,int *param_3)" identifier (parameter_list "(int param_1,int *param_2,int *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  byte bVar2;\n  byte *pbVar3;\n  int iVar4;\n  undefined4 uVar5;\n  size_t sVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  size_t __n;\n  int in_GS_OFFSET;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar4 = DAT_000c3744;\n  uStack_14 = 0x5ddf9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_2 = 0;\n  param_2[1] = 0;\n  param_2[2] = 0;\n  param_2[3] = 0;\n  bVar2 = **(byte **)(iVar4 + 8);\n  **(byte **)(param_1 + 0x80) = bVar2;\n  iVar4 = *param_3;\n  pbVar8 = *(byte **)(param_1 + 0x7c);\n  *param_2 = (int)pbVar8;\n  pbVar7 = pbVar8;\n  if (iVar4 == 2) {\n    pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);\n  }\n  pbVar3 = *(byte **)(param_1 + 0x80);\n  if ((bVar2 == 10) || (DAT_000c49c0 < 2)) {\n    bVar1 = *pbVar7;\n    while (bVar1 != bVar2) {\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }\n    param_2[1] = (int)pbVar7 - (int)pbVar8;\n    if (pbVar7 < pbVar3) {\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }\n  }\n  else {\n    __n = (int)pbVar3 - (int)pbVar7;\n    local_28.__count = 0;\n    local_28.__value.__wch = 0;\n    do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar5;\n  }\n                    \n  FUN_00087be0();\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "mbstate_t local_28;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "iVar4 = DAT_000c3744;" (assignment_expression "iVar4 = DAT_000c3744" identifier = identifier) ;) (expression_statement "uStack_14 = 0x5ddf9;" (assignment_expression "uStack_14 = 0x5ddf9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "param_2[1] = 0;" (assignment_expression "param_2[1] = 0" (subscript_expression "param_2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_2[2] = 0;" (assignment_expression "param_2[2] = 0" (subscript_expression "param_2[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_2[3] = 0;" (assignment_expression "param_2[3] = 0" (subscript_expression "param_2[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "bVar2 = **(byte **)(iVar4 + 8);" (assignment_expression "bVar2 = **(byte **)(iVar4 + 8)" identifier = (pointer_expression "**(byte **)(iVar4 + 8)" * (pointer_expression "*(byte **)(iVar4 + 8)" * (cast_expression "(byte **)(iVar4 + 8)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar4 + 8)" ( (binary_expression "iVar4 + 8" identifier + number_literal) )))))) ;) (expression_statement "**(byte **)(param_1 + 0x80) = bVar2;" (assignment_expression "**(byte **)(param_1 + 0x80) = bVar2" (pointer_expression "**(byte **)(param_1 + 0x80)" * (pointer_expression "*(byte **)(param_1 + 0x80)" * (cast_expression "(byte **)(param_1 + 0x80)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) = identifier) ;) (expression_statement "iVar4 = *param_3;" (assignment_expression "iVar4 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (expression_statement "pbVar8 = *(byte **)(param_1 + 0x7c);" (assignment_expression "pbVar8 = *(byte **)(param_1 + 0x7c)" identifier = (pointer_expression "*(byte **)(param_1 + 0x7c)" * (cast_expression "(byte **)(param_1 + 0x7c)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x7c)" ( (binary_expression "param_1 + 0x7c" identifier + number_literal) ))))) ;) (expression_statement "*param_2 = (int)pbVar8;" (assignment_expression "*param_2 = (int)pbVar8" (pointer_expression "*param_2" * identifier) = (cast_expression "(int)pbVar8" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "pbVar7 = pbVar8;" (assignment_expression "pbVar7 = pbVar8" identifier = identifier) ;) (if_statement "if (iVar4 == 2) {\n    pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);\n  }" if (parenthesized_expression "(iVar4 == 2)" ( (binary_expression "iVar4 == 2" identifier == number_literal) )) (compound_statement "{\n    pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);\n  }" { (expression_statement "pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);" (assignment_expression "pbVar7 = pbVar8 + *(int *)(param_1 + 0x94)" identifier = (binary_expression "pbVar8 + *(int *)(param_1 + 0x94)" identifier + (pointer_expression "*(int *)(param_1 + 0x94)" * (cast_expression "(int *)(param_1 + 0x94)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x94)" ( (binary_expression "param_1 + 0x94" identifier + number_literal) )))))) ;) })) (expression_statement "pbVar3 = *(byte **)(param_1 + 0x80);" (assignment_expression "pbVar3 = *(byte **)(param_1 + 0x80)" identifier = (pointer_expression "*(byte **)(param_1 + 0x80)" * (cast_expression "(byte **)(param_1 + 0x80)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) ;) (if_statement "if ((bVar2 == 10) || (DAT_000c49c0 < 2)) {\n    bVar1 = *pbVar7;\n    while (bVar1 != bVar2) {\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }\n    param_2[1] = (int)pbVar7 - (int)pbVar8;\n    if (pbVar7 < pbVar3) {\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }\n  }\n  else {\n    __n = (int)pbVar3 - (int)pbVar7;\n    local_28.__count = 0;\n    local_28.__value.__wch = 0;\n    do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }\n  }" if (parenthesized_expression "((bVar2 == 10) || (DAT_000c49c0 < 2))" ( (binary_expression "(bVar2 == 10) || (DAT_000c49c0 < 2)" (parenthesized_expression "(bVar2 == 10)" ( (binary_expression "bVar2 == 10" identifier == number_literal) )) || (parenthesized_expression "(DAT_000c49c0 < 2)" ( (binary_expression "DAT_000c49c0 < 2" identifier < number_literal) ))) )) (compound_statement "{\n    bVar1 = *pbVar7;\n    while (bVar1 != bVar2) {\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }\n    param_2[1] = (int)pbVar7 - (int)pbVar8;\n    if (pbVar7 < pbVar3) {\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }\n  }" { (expression_statement "bVar1 = *pbVar7;" (assignment_expression "bVar1 = *pbVar7" identifier = (pointer_expression "*pbVar7" * identifier)) ;) (while_statement "while (bVar1 != bVar2) {\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }" while (parenthesized_expression "(bVar1 != bVar2)" ( (binary_expression "bVar1 != bVar2" identifier != identifier) )) (compound_statement "{\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }" { (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" identifier = (binary_expression "pbVar7 + 1" identifier + number_literal)) ;) (expression_statement "bVar1 = *pbVar7;" (assignment_expression "bVar1 = *pbVar7" identifier = (pointer_expression "*pbVar7" * identifier)) ;) })) (expression_statement "param_2[1] = (int)pbVar7 - (int)pbVar8;" (assignment_expression "param_2[1] = (int)pbVar7 - (int)pbVar8" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (binary_expression "(int)pbVar7 - (int)pbVar8" (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar8" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (pbVar7 < pbVar3) {\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }" if (parenthesized_expression "(pbVar7 < pbVar3)" ( (binary_expression "pbVar7 < pbVar3" identifier < identifier) )) (compound_statement "{\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }" { (expression_statement "param_2[2] = (int)pbVar7;" (assignment_expression "param_2[2] = (int)pbVar7" (subscript_expression "param_2[2]" identifier [ number_literal ]) = (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "param_2[3] = 1;" (assignment_expression "param_2[3] = 1" (subscript_expression "param_2[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }" else (compound_statement "{\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }" { (expression_statement "uVar5 = 1;" (assignment_expression "uVar5 = 1" identifier = number_literal) ;) (expression_statement "*param_3 = 2;" (assignment_expression "*param_3 = 2" (pointer_expression "*param_3" * identifier) = number_literal) ;) (expression_statement "*(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;" (assignment_expression "*(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8" (pointer_expression "*(int *)(param_1 + 0x94)" * (cast_expression "(int *)(param_1 + 0x94)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x94)" ( (binary_expression "param_1 + 0x94" identifier + number_literal) )))) = (binary_expression "(int)pbVar7 - (int)pbVar8" (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar8" ( (type_descriptor "int" primitive_type) ) identifier))) ;) }))) }) (else_clause "else {\n    __n = (int)pbVar3 - (int)pbVar7;\n    local_28.__count = 0;\n    local_28.__value.__wch = 0;\n    do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }\n  }" else (compound_statement "{\n    __n = (int)pbVar3 - (int)pbVar7;\n    local_28.__count = 0;\n    local_28.__value.__wch = 0;\n    do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }\n  }" { (expression_statement "__n = (int)pbVar3 - (int)pbVar7;" (assignment_expression "__n = (int)pbVar3 - (int)pbVar7" identifier = (binary_expression "(int)pbVar3 - (int)pbVar7" (cast_expression "(int)pbVar3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "local_28.__count = 0;" (assignment_expression "local_28.__count = 0" (field_expression "local_28.__count" identifier . field_identifier) = number_literal) ;) (expression_statement "local_28.__value.__wch = 0;" (assignment_expression "local_28.__value.__wch = 0" (field_expression "local_28.__value.__wch" (field_expression "local_28.__value" identifier . field_identifier) . field_identifier) = number_literal) ;) (do_statement "do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));" do (compound_statement "{\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    }" { (expression_statement "pbVar8 = pbVar7;" (assignment_expression "pbVar8 = pbVar7" identifier = identifier) ;) (expression_statement "bVar1 = *pbVar8;" (assignment_expression "bVar1 = *pbVar8" identifier = (pointer_expression "*pbVar8" * identifier)) ;) (if_statement "if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }" if (parenthesized_expression "(((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc))" ( (binary_expression "((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)" (parenthesized_expression "((&DAT_000c4b60)[bVar1] == -1)" ( (binary_expression "(&DAT_000c4b60)[bVar1] == -1" (subscript_expression "(&DAT_000c4b60)[bVar1]" (parenthesized_expression "(&DAT_000c4b60)" ( (pointer_expression "&DAT_000c4b60" & identifier) )) [ identifier ]) == number_literal) )) && (parenthesized_expression "(sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)" ( (comma_expression "sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc" (assignment_expression "sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28)" identifier = (call_expression "mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28)" identifier (argument_list "((wchar_t *)0x0,(char *)pbVar8,__n,&local_28)" ( (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(char *)pbVar8" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier , (pointer_expression "&local_28" & identifier) )))) , (binary_expression "sVar6 - 2 < 0xfffffffc" (binary_expression "sVar6 - 2" identifier - number_literal) < number_literal)) ))) )) (compound_statement "{\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }" { (expression_statement "__n = __n - sVar6;" (assignment_expression "__n = __n - sVar6" identifier = (binary_expression "__n - sVar6" identifier - identifier)) ;) (expression_statement "pbVar7 = pbVar8 + sVar6;" (assignment_expression "pbVar7 = pbVar8 + sVar6" identifier = (binary_expression "pbVar8 + sVar6" identifier + identifier)) ;) }) (else_clause "else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }" else (compound_statement "{\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }" { (expression_statement "sVar6 = 1;" (assignment_expression "sVar6 = 1" identifier = number_literal) ;) (expression_statement "__n = __n - 1;" (assignment_expression "__n = __n - 1" identifier = (binary_expression "__n - 1" identifier - number_literal)) ;) (expression_statement "pbVar7 = pbVar8 + 1;" (assignment_expression "pbVar7 = pbVar8 + 1" identifier = (binary_expression "pbVar8 + 1" identifier + number_literal)) ;) }))) }) while (parenthesized_expression "((0 < (int)__n) && (bVar1 != bVar2))" ( (binary_expression "(0 < (int)__n) && (bVar1 != bVar2)" (parenthesized_expression "(0 < (int)__n)" ( (binary_expression "0 < (int)__n" number_literal < (cast_expression "(int)__n" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "(bVar1 != bVar2)" ( (binary_expression "bVar1 != bVar2" identifier != identifier) ))) )) ;) (if_statement "if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }" if (parenthesized_expression "((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80)))" ( (binary_expression "(bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))" (parenthesized_expression "(bVar1 == bVar2)" ( (binary_expression "bVar1 == bVar2" identifier == identifier) )) && (parenthesized_expression "(pbVar8 < *(byte **)(param_1 + 0x80))" ( (binary_expression "pbVar8 < *(byte **)(param_1 + 0x80)" identifier < (pointer_expression "*(byte **)(param_1 + 0x80)" * (cast_expression "(byte **)(param_1 + 0x80)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x80)" ( (binary_expression "param_1 + 0x80" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }" { (expression_statement "param_2[3] = sVar6;" (assignment_expression "param_2[3] = sVar6" (subscript_expression "param_2[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_2[1] = ((int)pbVar7 - *param_2) - sVar6;" (assignment_expression "param_2[1] = ((int)pbVar7 - *param_2) - sVar6" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (binary_expression "((int)pbVar7 - *param_2) - sVar6" (parenthesized_expression "((int)pbVar7 - *param_2)" ( (binary_expression "(int)pbVar7 - *param_2" (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier) - (pointer_expression "*param_2" * identifier)) )) - identifier)) ;) (expression_statement "param_2[2] = (int)pbVar8;" (assignment_expression "param_2[2] = (int)pbVar8" (subscript_expression "param_2[2]" identifier [ number_literal ]) = (cast_expression "(int)pbVar8" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" * identifier) = number_literal) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }" else (compound_statement "{\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }" { (expression_statement "param_2[1] = (int)pbVar7 - *param_2;" (assignment_expression "param_2[1] = (int)pbVar7 - *param_2" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (binary_expression "(int)pbVar7 - *param_2" (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier) - (pointer_expression "*param_2" * identifier))) ;) (expression_statement "*param_3 = 2;" (assignment_expression "*param_3 = 2" (pointer_expression "*param_3" * identifier) = number_literal) ;) (expression_statement "*(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);" (assignment_expression "*(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c)" (pointer_expression "*(int *)(param_1 + 0x94)" * (cast_expression "(int *)(param_1 + 0x94)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x94)" ( (binary_expression "param_1 + 0x94" identifier + number_literal) )))) = (binary_expression "(int)pbVar7 - *(int *)(param_1 + 0x7c)" (cast_expression "(int)pbVar7" ( (type_descriptor "int" primitive_type) ) identifier) - (pointer_expression "*(int *)(param_1 + 0x7c)" * (cast_expression "(int *)(param_1 + 0x7c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x7c)" ( (binary_expression "param_1 + 0x7c" identifier + number_literal) )))))) ;) (expression_statement "uVar5 = 1;" (assignment_expression "uVar5 = 1" identifier = number_literal) ;) }))) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar5;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar5;\n  }" { (return_statement "return uVar5;" return identifier ;) })) (expression_statement "FUN_00087be0();" (call_expression "FUN_00087be0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (assignment_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression IDENT < LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = LIT) ;) (expression_statement (assignment_expression (field_expression (field_expression IDENT . field_identifier) . field_identifier) = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ IDENT ]) == LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) , IDENT , (pointer_expression & IDENT) )))) , (binary_expression (binary_expression IDENT - LIT) < LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) }) while (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) && (parenthesized_expression ( (binary_expression IDENT != IDENT) ))) )) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == IDENT) )) && (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (pointer_expression * IDENT)) )) - IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined4 FUN_0005ddf0(int param_1,int *param_2,int *param_3)\n\n{\n  byte bVar1;\n  byte bVar2;\n  byte *pbVar3;\n  int iVar4;\n  undefined4 uVar5;\n  size_t sVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  size_t __n;\n  int in_GS_OFFSET;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar4 = DAT_000c3744;\n  uStack_14 = 0x5ddf9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_2 = 0;\n  param_2[1] = 0;\n  param_2[2] = 0;\n  param_2[3] = 0;\n  bVar2 = **(byte **)(iVar4 + 8);\n  **(byte **)(param_1 + 0x80) = bVar2;\n  iVar4 = *param_3;\n  pbVar8 = *(byte **)(param_1 + 0x7c);\n  *param_2 = (int)pbVar8;\n  pbVar7 = pbVar8;\n  if (iVar4 == 2) {\n    pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);\n  }\n  pbVar3 = *(byte **)(param_1 + 0x80);\n  if ((bVar2 == 10) || (DAT_000c49c0 < 2)) {\n    bVar1 = *pbVar7;\n    while (bVar1 != bVar2) {\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }\n    param_2[1] = (int)pbVar7 - (int)pbVar8;\n    if (pbVar7 < pbVar3) {\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }\n  }\n  else {\n    __n = (int)pbVar3 - (int)pbVar7;\n    local_28.__count = 0;\n    local_28.__value.__wch = 0;\n    do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar5;\n  }\n                    \n  FUN_00087be0();\n}" (type_identifier "undefined4") (function_declarator "FUN_0005ddf0(int param_1,int *param_2,int *param_3)" (identifier "FUN_0005ddf0") (parameter_list "(int param_1,int *param_2,int *param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int *param_3" (primitive_type "int") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  byte bVar1;\n  byte bVar2;\n  byte *pbVar3;\n  int iVar4;\n  undefined4 uVar5;\n  size_t sVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  size_t __n;\n  int in_GS_OFFSET;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar4 = DAT_000c3744;\n  uStack_14 = 0x5ddf9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_2 = 0;\n  param_2[1] = 0;\n  param_2[2] = 0;\n  param_2[3] = 0;\n  bVar2 = **(byte **)(iVar4 + 8);\n  **(byte **)(param_1 + 0x80) = bVar2;\n  iVar4 = *param_3;\n  pbVar8 = *(byte **)(param_1 + 0x7c);\n  *param_2 = (int)pbVar8;\n  pbVar7 = pbVar8;\n  if (iVar4 == 2) {\n    pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);\n  }\n  pbVar3 = *(byte **)(param_1 + 0x80);\n  if ((bVar2 == 10) || (DAT_000c49c0 < 2)) {\n    bVar1 = *pbVar7;\n    while (bVar1 != bVar2) {\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }\n    param_2[1] = (int)pbVar7 - (int)pbVar8;\n    if (pbVar7 < pbVar3) {\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }\n  }\n  else {\n    __n = (int)pbVar3 - (int)pbVar7;\n    local_28.__count = 0;\n    local_28.__value.__wch = 0;\n    do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar5;\n  }\n                    \n  FUN_00087be0();\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "byte bVar2;" (type_identifier "byte") (identifier "bVar2") (; ";")) (declaration "byte *pbVar3;" (type_identifier "byte") (pointer_declarator "*pbVar3" (* "*") (identifier "pbVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (declaration "size_t sVar6;" (primitive_type "size_t") (identifier "sVar6") (; ";")) (declaration "byte *pbVar7;" (type_identifier "byte") (pointer_declarator "*pbVar7" (* "*") (identifier "pbVar7")) (; ";")) (declaration "byte *pbVar8;" (type_identifier "byte") (pointer_declarator "*pbVar8" (* "*") (identifier "pbVar8")) (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "mbstate_t local_28;" (type_identifier "mbstate_t") (identifier "local_28") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "iVar4 = DAT_000c3744;" (assignment_expression "iVar4 = DAT_000c3744" (identifier "iVar4") (= "=") (identifier "DAT_000c3744")) (; ";")) (expression_statement "uStack_14 = 0x5ddf9;" (assignment_expression "uStack_14 = 0x5ddf9" (identifier "uStack_14") (= "=") (number_literal "0x5ddf9")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_2[1] = 0;" (assignment_expression "param_2[1] = 0" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_2[2] = 0;" (assignment_expression "param_2[2] = 0" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_2[3] = 0;" (assignment_expression "param_2[3] = 0" (subscript_expression "param_2[3]" (identifier "param_2") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "bVar2 = **(byte **)(iVar4 + 8);" (assignment_expression "bVar2 = **(byte **)(iVar4 + 8)" (identifier "bVar2") (= "=") (pointer_expression "**(byte **)(iVar4 + 8)" (* "*") (pointer_expression "*(byte **)(iVar4 + 8)" (* "*") (cast_expression "(byte **)(iVar4 + 8)" (( "(") (type_descriptor "byte **" (type_identifier "byte") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar4 + 8)" (( "(") (binary_expression "iVar4 + 8" (identifier "iVar4") (+ "+") (number_literal "8")) () ")")))))) (; ";")) (expression_statement "**(byte **)(param_1 + 0x80) = bVar2;" (assignment_expression "**(byte **)(param_1 + 0x80) = bVar2" (pointer_expression "**(byte **)(param_1 + 0x80)" (* "*") (pointer_expression "*(byte **)(param_1 + 0x80)" (* "*") (cast_expression "(byte **)(param_1 + 0x80)" (( "(") (type_descriptor "byte **" (type_identifier "byte") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x80)" (( "(") (binary_expression "param_1 + 0x80" (identifier "param_1") (+ "+") (number_literal "0x80")) () ")"))))) (= "=") (identifier "bVar2")) (; ";")) (expression_statement "iVar4 = *param_3;" (assignment_expression "iVar4 = *param_3" (identifier "iVar4") (= "=") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) (; ";")) (expression_statement "pbVar8 = *(byte **)(param_1 + 0x7c);" (assignment_expression "pbVar8 = *(byte **)(param_1 + 0x7c)" (identifier "pbVar8") (= "=") (pointer_expression "*(byte **)(param_1 + 0x7c)" (* "*") (cast_expression "(byte **)(param_1 + 0x7c)" (( "(") (type_descriptor "byte **" (type_identifier "byte") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x7c)" (( "(") (binary_expression "param_1 + 0x7c" (identifier "param_1") (+ "+") (number_literal "0x7c")) () ")"))))) (; ";")) (expression_statement "*param_2 = (int)pbVar8;" (assignment_expression "*param_2 = (int)pbVar8" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (cast_expression "(int)pbVar8" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar8"))) (; ";")) (expression_statement "pbVar7 = pbVar8;" (assignment_expression "pbVar7 = pbVar8" (identifier "pbVar7") (= "=") (identifier "pbVar8")) (; ";")) (if_statement "if (iVar4 == 2) {\n    pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);\n  }" (if "if") (parenthesized_expression "(iVar4 == 2)" (( "(") (binary_expression "iVar4 == 2" (identifier "iVar4") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n    pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);\n  }" ({ "{") (expression_statement "pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);" (assignment_expression "pbVar7 = pbVar8 + *(int *)(param_1 + 0x94)" (identifier "pbVar7") (= "=") (binary_expression "pbVar8 + *(int *)(param_1 + 0x94)" (identifier "pbVar8") (+ "+") (pointer_expression "*(int *)(param_1 + 0x94)" (* "*") (cast_expression "(int *)(param_1 + 0x94)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x94)" (( "(") (binary_expression "param_1 + 0x94" (identifier "param_1") (+ "+") (number_literal "0x94")) () ")")))))) (; ";")) (} "}"))) (expression_statement "pbVar3 = *(byte **)(param_1 + 0x80);" (assignment_expression "pbVar3 = *(byte **)(param_1 + 0x80)" (identifier "pbVar3") (= "=") (pointer_expression "*(byte **)(param_1 + 0x80)" (* "*") (cast_expression "(byte **)(param_1 + 0x80)" (( "(") (type_descriptor "byte **" (type_identifier "byte") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x80)" (( "(") (binary_expression "param_1 + 0x80" (identifier "param_1") (+ "+") (number_literal "0x80")) () ")"))))) (; ";")) (if_statement "if ((bVar2 == 10) || (DAT_000c49c0 < 2)) {\n    bVar1 = *pbVar7;\n    while (bVar1 != bVar2) {\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }\n    param_2[1] = (int)pbVar7 - (int)pbVar8;\n    if (pbVar7 < pbVar3) {\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }\n  }\n  else {\n    __n = (int)pbVar3 - (int)pbVar7;\n    local_28.__count = 0;\n    local_28.__value.__wch = 0;\n    do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }\n  }" (if "if") (parenthesized_expression "((bVar2 == 10) || (DAT_000c49c0 < 2))" (( "(") (binary_expression "(bVar2 == 10) || (DAT_000c49c0 < 2)" (parenthesized_expression "(bVar2 == 10)" (( "(") (binary_expression "bVar2 == 10" (identifier "bVar2") (== "==") (number_literal "10")) () ")")) (|| "||") (parenthesized_expression "(DAT_000c49c0 < 2)" (( "(") (binary_expression "DAT_000c49c0 < 2" (identifier "DAT_000c49c0") (< "<") (number_literal "2")) () ")"))) () ")")) (compound_statement "{\n    bVar1 = *pbVar7;\n    while (bVar1 != bVar2) {\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }\n    param_2[1] = (int)pbVar7 - (int)pbVar8;\n    if (pbVar7 < pbVar3) {\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }\n  }" ({ "{") (expression_statement "bVar1 = *pbVar7;" (assignment_expression "bVar1 = *pbVar7" (identifier "bVar1") (= "=") (pointer_expression "*pbVar7" (* "*") (identifier "pbVar7"))) (; ";")) (while_statement "while (bVar1 != bVar2) {\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }" (while "while") (parenthesized_expression "(bVar1 != bVar2)" (( "(") (binary_expression "bVar1 != bVar2" (identifier "bVar1") (!= "!=") (identifier "bVar2")) () ")")) (compound_statement "{\n      pbVar7 = pbVar7 + 1;\n      bVar1 = *pbVar7;\n    }" ({ "{") (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" (identifier "pbVar7") (= "=") (binary_expression "pbVar7 + 1" (identifier "pbVar7") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "bVar1 = *pbVar7;" (assignment_expression "bVar1 = *pbVar7" (identifier "bVar1") (= "=") (pointer_expression "*pbVar7" (* "*") (identifier "pbVar7"))) (; ";")) (} "}"))) (expression_statement "param_2[1] = (int)pbVar7 - (int)pbVar8;" (assignment_expression "param_2[1] = (int)pbVar7 - (int)pbVar8" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "(int)pbVar7 - (int)pbVar8" (cast_expression "(int)pbVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar7")) (- "-") (cast_expression "(int)pbVar8" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar8")))) (; ";")) (if_statement "if (pbVar7 < pbVar3) {\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }" (if "if") (parenthesized_expression "(pbVar7 < pbVar3)" (( "(") (binary_expression "pbVar7 < pbVar3" (identifier "pbVar7") (< "<") (identifier "pbVar3")) () ")")) (compound_statement "{\n      param_2[2] = (int)pbVar7;\n      param_2[3] = 1;\n      *param_3 = 0;\n      uVar5 = 0;\n    }" ({ "{") (expression_statement "param_2[2] = (int)pbVar7;" (assignment_expression "param_2[2] = (int)pbVar7" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (= "=") (cast_expression "(int)pbVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar7"))) (; ";")) (expression_statement "param_2[3] = 1;" (assignment_expression "param_2[3] = 1" (subscript_expression "param_2[3]" (identifier "param_2") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "1")) (; ";")) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }" (else "else") (compound_statement "{\n      uVar5 = 1;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;\n    }" ({ "{") (expression_statement "uVar5 = 1;" (assignment_expression "uVar5 = 1" (identifier "uVar5") (= "=") (number_literal "1")) (; ";")) (expression_statement "*param_3 = 2;" (assignment_expression "*param_3 = 2" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "2")) (; ";")) (expression_statement "*(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;" (assignment_expression "*(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8" (pointer_expression "*(int *)(param_1 + 0x94)" (* "*") (cast_expression "(int *)(param_1 + 0x94)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x94)" (( "(") (binary_expression "param_1 + 0x94" (identifier "param_1") (+ "+") (number_literal "0x94")) () ")")))) (= "=") (binary_expression "(int)pbVar7 - (int)pbVar8" (cast_expression "(int)pbVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar7")) (- "-") (cast_expression "(int)pbVar8" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar8")))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n    __n = (int)pbVar3 - (int)pbVar7;\n    local_28.__count = 0;\n    local_28.__value.__wch = 0;\n    do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }\n  }" (else "else") (compound_statement "{\n    __n = (int)pbVar3 - (int)pbVar7;\n    local_28.__count = 0;\n    local_28.__value.__wch = 0;\n    do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));\n    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }\n  }" ({ "{") (expression_statement "__n = (int)pbVar3 - (int)pbVar7;" (assignment_expression "__n = (int)pbVar3 - (int)pbVar7" (identifier "__n") (= "=") (binary_expression "(int)pbVar3 - (int)pbVar7" (cast_expression "(int)pbVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar3")) (- "-") (cast_expression "(int)pbVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar7")))) (; ";")) (expression_statement "local_28.__count = 0;" (assignment_expression "local_28.__count = 0" (field_expression "local_28.__count" (identifier "local_28") (. ".") (field_identifier "__count")) (= "=") (number_literal "0")) (; ";")) (expression_statement "local_28.__value.__wch = 0;" (assignment_expression "local_28.__value.__wch = 0" (field_expression "local_28.__value.__wch" (field_expression "local_28.__value" (identifier "local_28") (. ".") (field_identifier "__value")) (. ".") (field_identifier "__wch")) (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    } while ((0 < (int)__n) && (bVar1 != bVar2));" (do "do") (compound_statement "{\n      pbVar8 = pbVar7;\n      bVar1 = *pbVar8;\n      if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }\n    }" ({ "{") (expression_statement "pbVar8 = pbVar7;" (assignment_expression "pbVar8 = pbVar7" (identifier "pbVar8") (= "=") (identifier "pbVar7")) (; ";")) (expression_statement "bVar1 = *pbVar8;" (assignment_expression "bVar1 = *pbVar8" (identifier "bVar1") (= "=") (pointer_expression "*pbVar8" (* "*") (identifier "pbVar8"))) (; ";")) (if_statement "if (((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }\n      else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }" (if "if") (parenthesized_expression "(((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc))" (( "(") (binary_expression "((&DAT_000c4b60)[bVar1] == -1) &&\n         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)" (parenthesized_expression "((&DAT_000c4b60)[bVar1] == -1)" (( "(") (binary_expression "(&DAT_000c4b60)[bVar1] == -1" (subscript_expression "(&DAT_000c4b60)[bVar1]" (parenthesized_expression "(&DAT_000c4b60)" (( "(") (pointer_expression "&DAT_000c4b60" (& "&") (identifier "DAT_000c4b60")) () ")")) ([ "[") (identifier "bVar1") (] "]")) (== "==") (number_literal "-1")) () ")")) (&& "&&") (parenthesized_expression "(sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)" (( "(") (comma_expression "sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc" (assignment_expression "sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28)" (identifier "sVar6") (= "=") (call_expression "mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28)" (identifier "mbrtowc") (argument_list "((wchar_t *)0x0,(char *)pbVar8,__n,&local_28)" (( "(") (cast_expression "(wchar_t *)0x0" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (, ",") (cast_expression "(char *)pbVar8" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "pbVar8")) (, ",") (identifier "__n") (, ",") (pointer_expression "&local_28" (& "&") (identifier "local_28")) () ")")))) (, ",") (binary_expression "sVar6 - 2 < 0xfffffffc" (binary_expression "sVar6 - 2" (identifier "sVar6") (- "-") (number_literal "2")) (< "<") (number_literal "0xfffffffc"))) () ")"))) () ")")) (compound_statement "{\n        __n = __n - sVar6;\n        pbVar7 = pbVar8 + sVar6;\n      }" ({ "{") (expression_statement "__n = __n - sVar6;" (assignment_expression "__n = __n - sVar6" (identifier "__n") (= "=") (binary_expression "__n - sVar6" (identifier "__n") (- "-") (identifier "sVar6"))) (; ";")) (expression_statement "pbVar7 = pbVar8 + sVar6;" (assignment_expression "pbVar7 = pbVar8 + sVar6" (identifier "pbVar7") (= "=") (binary_expression "pbVar8 + sVar6" (identifier "pbVar8") (+ "+") (identifier "sVar6"))) (; ";")) (} "}")) (else_clause "else {\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }" (else "else") (compound_statement "{\n        sVar6 = 1;\n        __n = __n - 1;\n        pbVar7 = pbVar8 + 1;\n      }" ({ "{") (expression_statement "sVar6 = 1;" (assignment_expression "sVar6 = 1" (identifier "sVar6") (= "=") (number_literal "1")) (; ";")) (expression_statement "__n = __n - 1;" (assignment_expression "__n = __n - 1" (identifier "__n") (= "=") (binary_expression "__n - 1" (identifier "__n") (- "-") (number_literal "1"))) (; ";")) (expression_statement "pbVar7 = pbVar8 + 1;" (assignment_expression "pbVar7 = pbVar8 + 1" (identifier "pbVar7") (= "=") (binary_expression "pbVar8 + 1" (identifier "pbVar8") (+ "+") (number_literal "1"))) (; ";")) (} "}")))) (} "}")) (while "while") (parenthesized_expression "((0 < (int)__n) && (bVar1 != bVar2))" (( "(") (binary_expression "(0 < (int)__n) && (bVar1 != bVar2)" (parenthesized_expression "(0 < (int)__n)" (( "(") (binary_expression "0 < (int)__n" (number_literal "0") (< "<") (cast_expression "(int)__n" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__n"))) () ")")) (&& "&&") (parenthesized_expression "(bVar1 != bVar2)" (( "(") (binary_expression "bVar1 != bVar2" (identifier "bVar1") (!= "!=") (identifier "bVar2")) () ")"))) () ")")) (; ";")) (if_statement "if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }\n    else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }" (if "if") (parenthesized_expression "((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80)))" (( "(") (binary_expression "(bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))" (parenthesized_expression "(bVar1 == bVar2)" (( "(") (binary_expression "bVar1 == bVar2" (identifier "bVar1") (== "==") (identifier "bVar2")) () ")")) (&& "&&") (parenthesized_expression "(pbVar8 < *(byte **)(param_1 + 0x80))" (( "(") (binary_expression "pbVar8 < *(byte **)(param_1 + 0x80)" (identifier "pbVar8") (< "<") (pointer_expression "*(byte **)(param_1 + 0x80)" (* "*") (cast_expression "(byte **)(param_1 + 0x80)" (( "(") (type_descriptor "byte **" (type_identifier "byte") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x80)" (( "(") (binary_expression "param_1 + 0x80" (identifier "param_1") (+ "+") (number_literal "0x80")) () ")"))))) () ")"))) () ")")) (compound_statement "{\n      param_2[3] = sVar6;\n      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;\n      param_2[2] = (int)pbVar8;\n      *param_3 = 0;\n      uVar5 = 0;\n    }" ({ "{") (expression_statement "param_2[3] = sVar6;" (assignment_expression "param_2[3] = sVar6" (subscript_expression "param_2[3]" (identifier "param_2") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "sVar6")) (; ";")) (expression_statement "param_2[1] = ((int)pbVar7 - *param_2) - sVar6;" (assignment_expression "param_2[1] = ((int)pbVar7 - *param_2) - sVar6" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "((int)pbVar7 - *param_2) - sVar6" (parenthesized_expression "((int)pbVar7 - *param_2)" (( "(") (binary_expression "(int)pbVar7 - *param_2" (cast_expression "(int)pbVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar7")) (- "-") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) () ")")) (- "-") (identifier "sVar6"))) (; ";")) (expression_statement "param_2[2] = (int)pbVar8;" (assignment_expression "param_2[2] = (int)pbVar8" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (= "=") (cast_expression "(int)pbVar8" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar8"))) (; ";")) (expression_statement "*param_3 = 0;" (assignment_expression "*param_3 = 0" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }" (else "else") (compound_statement "{\n      param_2[1] = (int)pbVar7 - *param_2;\n      *param_3 = 2;\n      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);\n      uVar5 = 1;\n    }" ({ "{") (expression_statement "param_2[1] = (int)pbVar7 - *param_2;" (assignment_expression "param_2[1] = (int)pbVar7 - *param_2" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "(int)pbVar7 - *param_2" (cast_expression "(int)pbVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar7")) (- "-") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (expression_statement "*param_3 = 2;" (assignment_expression "*param_3 = 2" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "2")) (; ";")) (expression_statement "*(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);" (assignment_expression "*(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c)" (pointer_expression "*(int *)(param_1 + 0x94)" (* "*") (cast_expression "(int *)(param_1 + 0x94)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x94)" (( "(") (binary_expression "param_1 + 0x94" (identifier "param_1") (+ "+") (number_literal "0x94")) () ")")))) (= "=") (binary_expression "(int)pbVar7 - *(int *)(param_1 + 0x7c)" (cast_expression "(int)pbVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar7")) (- "-") (pointer_expression "*(int *)(param_1 + 0x7c)" (* "*") (cast_expression "(int *)(param_1 + 0x7c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x7c)" (( "(") (binary_expression "param_1 + 0x7c" (identifier "param_1") (+ "+") (number_literal "0x7c")) () ")")))))) (; ";")) (expression_statement "uVar5 = 1;" (assignment_expression "uVar5 = 1" (identifier "uVar5") (= "=") (number_literal "1")) (; ";")) (} "}")))) (} "}")))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar5;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return uVar5;\n  }" ({ "{") (return_statement "return uVar5;" (return "return") (identifier "uVar5") (; ";")) (} "}"))) (expression_statement "FUN_00087be0();" (call_expression "FUN_00087be0()" (identifier "FUN_00087be0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* WARNING: Unknown calling convention */

type_1 function_1(type_2 *iop,type_3 *recm,type_4 *state)

{
  type_5 var_7;
  type_5 var_5;
  int var_14;
  type_5 *var_9;
  type_4 var_2;
  type_6 *pNVar6;
  type_1 RVar7;
  size_t var_11;
  type_5 *var_8;
  type_5 *var_4;
  size_t var_12;
  size_t var_13;
  int var_1;
  type_7 mbs;
  
  pNVar6 = RS;
  var_14 = *(int *)(var_1 + 0x14);
  recm->start = (char *)0x0;
  recm->len = 0;
  recm->rt_start = (char *)0x0;
  recm->rt_len = 0;
  var_5 = *(pNVar6->sub).val.sp;
  *iop->dataend = var_5;
  var_2 = *state;
  var_4 = (type_5 *)iop->off;
  recm->start = (char *)var_4;
  var_8 = var_4;
  if (var_2 == var_3) {
    var_8 = var_4 + iop->scanoff;
  }
  var_9 = (type_5 *)iop->dataend;
  if ((var_5 == 10) || (var_6 < 2)) {
    var_7 = *var_8;
    while (var_7 != var_5) {
      var_8 = var_8 + 1;
      var_7 = *var_8;
    }
    recm->len = (int)var_8 - (int)var_4;
    if (var_8 < var_9) {
      recm->rt_start = (char *)var_8;
      recm->rt_len = 1;
      *state = NOSTATE;
      RVar7 = REC_OK;
    }
    else {
      RVar7 = NOTERM;
      *state = var_3;
      iop->scanoff = (int)var_8 - (int)var_4;
    }
  }
  else {
    var_12 = (int)var_9 - (int)var_8;
    mbs.__count = 0;
    mbs.__value.__wch = 0;
    do {
      var_4 = var_8;
      var_7 = *var_4;
      if (((&btowc_cache)[var_7] == -1) &&
         (var_11 = var_10((type_8 *)0x0,(char *)var_4,var_12,(type_7 *)&mbs),
         var_11 - 2 < 0xfffffffc)) {
        var_12 = var_12 - var_11;
        var_8 = var_4 + var_11;
      }
      else {
        var_11 = 1;
        var_12 = var_12 - 1;
        var_8 = var_4 + 1;
      }
    } while ((0 < (int)var_12) && (var_7 != var_5));
    var_13 = (int)var_8 - (int)recm->start;
    if ((var_7 == var_5) && (var_4 < iop->dataend)) {
      recm->rt_len = var_11;
      recm->len = var_13 - var_11;
      recm->rt_start = (char *)var_4;
      *state = NOSTATE;
      RVar7 = REC_OK;
    }
    else {
      recm->len = var_13;
      *state = var_3;
      iop->scanoff = (int)var_8 - (int)iop->off;
      RVar7 = NOTERM;
    }
  }
  if (var_14 == *(int *)(var_1 + 0x14)) {
    return RVar7;
  }
                    /* WARNING: Subroutine does not return */
  var_15();
}


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

/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

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

{
  byte bVar1;
  byte bVar2;
  byte *pbVar3;
  int iVar4;
  undefined4 uVar5;
  size_t sVar6;
  byte *pbVar7;
  byte *pbVar8;
  size_t __n;
  int in_GS_OFFSET;
  mbstate_t local_28;
  int local_20;
  undefined4 uStack_14;
  
  iVar4 = DAT_000c3744;
  uStack_14 = 0x5ddf9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  *param_2 = 0;
  param_2[1] = 0;
  param_2[2] = 0;
  param_2[3] = 0;
  bVar2 = **(byte **)(iVar4 + 8);
  **(byte **)(param_1 + 0x80) = bVar2;
  iVar4 = *param_3;
  pbVar8 = *(byte **)(param_1 + 0x7c);
  *param_2 = (int)pbVar8;
  pbVar7 = pbVar8;
  if (iVar4 == 2) {
    pbVar7 = pbVar8 + *(int *)(param_1 + 0x94);
  }
  pbVar3 = *(byte **)(param_1 + 0x80);
  if ((bVar2 == 10) || (DAT_000c49c0 < 2)) {
    bVar1 = *pbVar7;
    while (bVar1 != bVar2) {
      pbVar7 = pbVar7 + 1;
      bVar1 = *pbVar7;
    }
    param_2[1] = (int)pbVar7 - (int)pbVar8;
    if (pbVar7 < pbVar3) {
      param_2[2] = (int)pbVar7;
      param_2[3] = 1;
      *param_3 = 0;
      uVar5 = 0;
    }
    else {
      uVar5 = 1;
      *param_3 = 2;
      *(int *)(param_1 + 0x94) = (int)pbVar7 - (int)pbVar8;
    }
  }
  else {
    __n = (int)pbVar3 - (int)pbVar7;
    local_28.__count = 0;
    local_28.__value.__wch = 0;
    do {
      pbVar8 = pbVar7;
      bVar1 = *pbVar8;
      if (((&DAT_000c4b60)[bVar1] == -1) &&
         (sVar6 = mbrtowc((wchar_t *)0x0,(char *)pbVar8,__n,&local_28), sVar6 - 2 < 0xfffffffc)) {
        __n = __n - sVar6;
        pbVar7 = pbVar8 + sVar6;
      }
      else {
        sVar6 = 1;
        __n = __n - 1;
        pbVar7 = pbVar8 + 1;
      }
    } while ((0 < (int)__n) && (bVar1 != bVar2));
    if ((bVar1 == bVar2) && (pbVar8 < *(byte **)(param_1 + 0x80))) {
      param_2[3] = sVar6;
      param_2[1] = ((int)pbVar7 - *param_2) - sVar6;
      param_2[2] = (int)pbVar8;
      *param_3 = 0;
      uVar5 = 0;
    }
    else {
      param_2[1] = (int)pbVar7 - *param_2;
      *param_3 = 2;
      *(int *)(param_1 + 0x94) = (int)pbVar7 - *(int *)(param_1 + 0x7c);
      uVar5 = 1;
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar5;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00087be0();
}

