
void flipThisRun(bidi_char *from,uchar *level,int max,int count)

{
  byte bVar1;
  ushort uVar2;
  uint uVar3;
  uint uVar4;
  undefined2 uVar5;
  bidi_char *pbVar6;
  int iVar7;
  int iVar8;
  bidi_char *pbVar9;
  int iVar10;
  int iVar11;
  
  iVar10 = 0;
  if (0 < count) {
    while (iVar10 < count) {
      bVar1 = level[iVar10];
      iVar11 = iVar10;
      while (iVar10 = iVar11, max != (uint)bVar1) {
        iVar11 = iVar11 + 1;
        if (count == iVar11) {
          return;
        }
        bVar1 = level[iVar11];
      }
      do {
        iVar7 = iVar10;
        iVar10 = iVar7 + 1;
        if (count <= iVar10) break;
      } while (max <= (int)(uint)level[iVar7 + 1]);
      if (iVar11 < iVar7) {
        pbVar6 = from + iVar11;
        iVar8 = iVar7;
        pbVar9 = from + iVar7;
        do {
          uVar3 = pbVar9->origwc;
          iVar8 = iVar8 + -1;
          uVar2 = pbVar9->index;
          uVar4 = pbVar9->wc;
          pbVar9->origwc = pbVar6->origwc;
          pbVar9->wc = pbVar6->wc;
          uVar5 = *(undefined2 *)&pbVar6->field_0xa;
          pbVar9->index = pbVar6->index;
          *(undefined2 *)&pbVar9->field_0xa = uVar5;
          pbVar6->index = uVar2;
          pbVar6->origwc = uVar3;
          pbVar6->wc = uVar4;
          pbVar6 = pbVar6 + 1;
          pbVar9 = pbVar9 + -1;
        } while ((iVar11 + iVar7) - iVar8 < iVar8);
        iVar11 = iVar11 + 1 + ((uint)((iVar7 + -1) - iVar11) >> 1);
      }
      if (iVar11 <= iVar10) {
        iVar11 = iVar10;
      }
      if (count <= iVar11) {
        return;
      }
    }
  }
  return;
}



void FUN_0002c050(int param_1,int param_2,uint param_3,int param_4)

{
  byte bVar1;
  undefined2 uVar2;
  undefined4 uVar3;
  undefined4 uVar4;
  undefined4 *puVar5;
  int iVar6;
  int iVar7;
  undefined4 *puVar8;
  int iVar9;
  int iVar10;
  
  iVar9 = 0;
  if (0 < param_4) {
    while (iVar9 < param_4) {
      bVar1 = *(byte *)(param_2 + iVar9);
      iVar10 = iVar9;
      while (iVar9 = iVar10, param_3 != bVar1) {
        iVar10 = iVar10 + 1;
        if (param_4 == iVar10) {
          return;
        }
        bVar1 = *(byte *)(param_2 + iVar10);
      }
      do {
        iVar6 = iVar9;
        iVar9 = iVar6 + 1;
        if (param_4 <= iVar9) break;
      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));
      if (iVar10 < iVar6) {
        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);
        iVar7 = iVar6;
        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);
        do {
          uVar3 = *puVar8;
          iVar7 = iVar7 + -1;
          uVar2 = *(undefined2 *)(puVar8 + 2);
          uVar4 = puVar8[1];
          *puVar8 = *puVar5;
          puVar8[1] = puVar5[1];
          puVar8[2] = puVar5[2];
          *(undefined2 *)(puVar5 + 2) = uVar2;
          *puVar5 = uVar3;
          puVar5[1] = uVar4;
          puVar5 = puVar5 + 3;
          puVar8 = puVar8 + -3;
        } while ((iVar10 + iVar6) - iVar7 < iVar7);
        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);
      }
      if (iVar10 <= iVar9) {
        iVar10 = iVar9;
      }
      if (param_4 <= iVar10) {
        return;
      }
    }
  }
  return;
}


PUSH EBP
PUSH EDI
XOR EDI,EDI
PUSH ESI
PUSH EBX
SUB ESP,0x14
MOV EBP,dword ptr [ESP + 0x2c]
MOV EAX,dword ptr [ESP + 0x34]
MOV ESI,EBP
TEST EAX,EAX
JLE 0x0002c09f
LEA ESI,[ESI]
NOP
CMP dword ptr [ESP + 0x34],EDI
JLE 0x0002c09f
MOVZX EAX,byte ptr [ESI + EDI*0x1]
CMP dword ptr [ESP + 0x30],EAX
JZ 0x0002c0b0
MOV ECX,dword ptr [ESP + 0x30]
MOV EDX,dword ptr [ESP + 0x34]
JMP 0x0002c098
MOVZX EAX,byte ptr [ESI + EDI*0x1]
CMP ECX,EAX
JZ 0x0002c0b0
ADD EDI,0x1
CMP EDX,EDI
JNZ 0x0002c090
ADD ESP,0x14
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV ECX,EDI
MOV EDX,dword ptr [ESP + 0x30]
MOV EBX,dword ptr [ESP + 0x34]
JMP 0x0002c0c2
MOV ECX,EBP
LEA EBP,[ECX + 0x1]
CMP EBX,EBP
JLE 0x0002c0d2
MOVZX EAX,byte ptr [ESI + ECX*0x1 + 0x1]
CMP EAX,EDX
JGE 0x0002c0c0
CMP EDI,ECX
JGE 0x0002c17c
MOV EDX,dword ptr [ESP + 0x28]
LEA EAX,[ECX + ECX*0x2]
MOV EBX,EDI
MOV dword ptr [ESP + 0x8],EDI
MOV dword ptr [ESP + 0x4],ECX
LEA EAX,[EDX + EAX*0x4]
MOV dword ptr [ESP + 0xc],EBP
MOV dword ptr [ESP],EAX
LEA EAX,[EBX + EBX*0x2]
ADD EBX,ECX
LEA EAX,[EDX + EAX*0x4]
MOV dword ptr [ESP + 0x10],EBP
MOV EDX,dword ptr [ESP]
MOV dword ptr [ESP + 0x2c],ESI
MOV dword ptr [ESP],EBX
LEA ESI,[ESI]
NOP
MOV EBP,dword ptr [EAX]
MOV EDI,dword ptr [EDX]
SUB ECX,0x1
SUB EDX,0xc
MOVZX EBX,word ptr [EDX + 0x14]
MOV ESI,dword ptr [EDX + 0x10]
ADD EAX,0xc
MOV dword ptr [EDX + 0xc],EBP
MOV EBP,dword ptr [EAX + -0x8]
MOV dword ptr [EDX + 0x10],EBP
MOV EBP,dword ptr [EAX + -0x4]
MOV dword ptr [EDX + 0x14],EBP
MOV word ptr [EAX + -0x4],BX
MOV EBX,dword ptr [ESP]
MOV dword ptr [EAX + -0xc],EDI
SUB EBX,ECX
MOV dword ptr [EAX + -0x8],ESI
CMP ECX,EBX
JG 0x0002c110
MOV EAX,dword ptr [ESP + 0x4]
MOV ECX,dword ptr [ESP + 0x8]
MOV EBP,dword ptr [ESP + 0xc]
MOV EDI,dword ptr [ESP + 0x10]
SUB EAX,0x1
MOV ESI,dword ptr [ESP + 0x2c]
SUB EAX,ECX
SHR EAX,0x1
LEA EAX,[ECX + EAX*0x1 + 0x1]
CMP EBP,EAX
CMOVGE EAX,EBP
CMP EAX,dword ptr [ESP + 0x34]
JL 0x0002c070
ADD ESP,0x14
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,EDI
MOV EDI,EBP
JMP 0x0002c165
(translation_unit "void FUN_0002c050(int param_1,int param_2,uint param_3,int param_4)\n\n{\n  byte bVar1;\n  undefined2 uVar2;\n  undefined4 uVar3;\n  undefined4 uVar4;\n  undefined4 *puVar5;\n  int iVar6;\n  int iVar7;\n  undefined4 *puVar8;\n  int iVar9;\n  int iVar10;\n  \n  iVar9 = 0;\n  if (0 < param_4) {\n    while (iVar9 < param_4) {\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_0002c050(int param_1,int param_2,uint param_3,int param_4)\n\n{\n  byte bVar1;\n  undefined2 uVar2;\n  undefined4 uVar3;\n  undefined4 uVar4;\n  undefined4 *puVar5;\n  int iVar6;\n  int iVar7;\n  undefined4 *puVar8;\n  int iVar9;\n  int iVar10;\n  \n  iVar9 = 0;\n  if (0 < param_4) {\n    while (iVar9 < param_4) {\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0002c050(int param_1,int param_2,uint param_3,int param_4)" identifier (parameter_list "(int param_1,int param_2,uint param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  undefined2 uVar2;\n  undefined4 uVar3;\n  undefined4 uVar4;\n  undefined4 *puVar5;\n  int iVar6;\n  int iVar7;\n  undefined4 *puVar8;\n  int iVar9;\n  int iVar10;\n  \n  iVar9 = 0;\n  if (0 < param_4) {\n    while (iVar9 < param_4) {\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }\n  }\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined2 uVar2;" type_identifier identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "undefined4 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "undefined4 *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "int iVar10;" primitive_type identifier ;) (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" identifier = number_literal) ;) (if_statement "if (0 < param_4) {\n    while (iVar9 < param_4) {\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }\n  }" if (parenthesized_expression "(0 < param_4)" ( (binary_expression "0 < param_4" number_literal < identifier) )) (compound_statement "{\n    while (iVar9 < param_4) {\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }\n  }" { (while_statement "while (iVar9 < param_4) {\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }" while (parenthesized_expression "(iVar9 < param_4)" ( (binary_expression "iVar9 < param_4" identifier < identifier) )) (compound_statement "{\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }" { (expression_statement "bVar1 = *(byte *)(param_2 + iVar9);" (assignment_expression "bVar1 = *(byte *)(param_2 + iVar9)" identifier = (pointer_expression "*(byte *)(param_2 + iVar9)" * (cast_expression "(byte *)(param_2 + iVar9)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + iVar9)" ( (binary_expression "param_2 + iVar9" identifier + identifier) ))))) ;) (expression_statement "iVar10 = iVar9;" (assignment_expression "iVar10 = iVar9" identifier = identifier) ;) (while_statement "while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }" while (parenthesized_expression "(iVar9 = iVar10, param_3 != bVar1)" ( (comma_expression "iVar9 = iVar10, param_3 != bVar1" (assignment_expression "iVar9 = iVar10" identifier = identifier) , (binary_expression "param_3 != bVar1" identifier != identifier)) )) (compound_statement "{\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }" { (expression_statement "iVar10 = iVar10 + 1;" (assignment_expression "iVar10 = iVar10 + 1" identifier = (binary_expression "iVar10 + 1" identifier + number_literal)) ;) (if_statement "if (param_4 == iVar10) {\n          return;\n        }" if (parenthesized_expression "(param_4 == iVar10)" ( (binary_expression "param_4 == iVar10" identifier == identifier) )) (compound_statement "{\n          return;\n        }" { (return_statement "return;" return ;) })) (expression_statement "bVar1 = *(byte *)(param_2 + iVar10);" (assignment_expression "bVar1 = *(byte *)(param_2 + iVar10)" identifier = (pointer_expression "*(byte *)(param_2 + iVar10)" * (cast_expression "(byte *)(param_2 + iVar10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + iVar10)" ( (binary_expression "param_2 + iVar10" identifier + identifier) ))))) ;) })) (do_statement "do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));" do (compound_statement "{\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      }" { (expression_statement "iVar6 = iVar9;" (assignment_expression "iVar6 = iVar9" identifier = identifier) ;) (expression_statement "iVar9 = iVar6 + 1;" (assignment_expression "iVar9 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (if_statement "if (param_4 <= iVar9) break;" if (parenthesized_expression "(param_4 <= iVar9)" ( (binary_expression "param_4 <= iVar9" identifier <= identifier) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6))" ( (binary_expression "(int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6)" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) <= (binary_expression "(int)(uint)*(byte *)(param_2 + 1 + iVar6)" (cast_expression "(int)(uint)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(byte *)(param_2 + 1 + iVar6)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 1 + iVar6)" ( (binary_expression "param_2 + 1 + iVar6" (binary_expression "param_2 + 1" identifier + number_literal) + identifier) ))))) )) ;) (if_statement "if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }" if (parenthesized_expression "(iVar10 < iVar6)" ( (binary_expression "iVar10 < iVar6" identifier < identifier) )) (compound_statement "{\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }" { (expression_statement "puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);" (assignment_expression "puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc)" identifier = (cast_expression "(undefined4 *)(param_1 + iVar10 * 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar10 * 0xc)" ( (binary_expression "param_1 + iVar10 * 0xc" identifier + (binary_expression "iVar10 * 0xc" identifier * number_literal)) )))) ;) (expression_statement "iVar7 = iVar6;" (assignment_expression "iVar7 = iVar6" identifier = identifier) ;) (expression_statement "puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);" (assignment_expression "puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc)" identifier = (cast_expression "(undefined4 *)(param_1 + iVar6 * 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar6 * 0xc)" ( (binary_expression "param_1 + iVar6 * 0xc" identifier + (binary_expression "iVar6 * 0xc" identifier * number_literal)) )))) ;) (do_statement "do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);" do (compound_statement "{\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        }" { (expression_statement "uVar3 = *puVar8;" (assignment_expression "uVar3 = *puVar8" identifier = (pointer_expression "*puVar8" * identifier)) ;) (expression_statement "iVar7 = iVar7 + -1;" (assignment_expression "iVar7 = iVar7 + -1" identifier = (binary_expression "iVar7 + -1" identifier + number_literal)) ;) (expression_statement "uVar2 = *(undefined2 *)(puVar8 + 2);" (assignment_expression "uVar2 = *(undefined2 *)(puVar8 + 2)" identifier = (pointer_expression "*(undefined2 *)(puVar8 + 2)" * (cast_expression "(undefined2 *)(puVar8 + 2)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar8 + 2)" ( (binary_expression "puVar8 + 2" identifier + number_literal) ))))) ;) (expression_statement "uVar4 = puVar8[1];" (assignment_expression "uVar4 = puVar8[1]" identifier = (subscript_expression "puVar8[1]" identifier [ number_literal ])) ;) (expression_statement "*puVar8 = *puVar5;" (assignment_expression "*puVar8 = *puVar5" (pointer_expression "*puVar8" * identifier) = (pointer_expression "*puVar5" * identifier)) ;) (expression_statement "puVar8[1] = puVar5[1];" (assignment_expression "puVar8[1] = puVar5[1]" (subscript_expression "puVar8[1]" identifier [ number_literal ]) = (subscript_expression "puVar5[1]" identifier [ number_literal ])) ;) (expression_statement "puVar8[2] = puVar5[2];" (assignment_expression "puVar8[2] = puVar5[2]" (subscript_expression "puVar8[2]" identifier [ number_literal ]) = (subscript_expression "puVar5[2]" identifier [ number_literal ])) ;) (expression_statement "*(undefined2 *)(puVar5 + 2) = uVar2;" (assignment_expression "*(undefined2 *)(puVar5 + 2) = uVar2" (pointer_expression "*(undefined2 *)(puVar5 + 2)" * (cast_expression "(undefined2 *)(puVar5 + 2)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar5 + 2)" ( (binary_expression "puVar5 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "*puVar5 = uVar3;" (assignment_expression "*puVar5 = uVar3" (pointer_expression "*puVar5" * identifier) = identifier) ;) (expression_statement "puVar5[1] = uVar4;" (assignment_expression "puVar5[1] = uVar4" (subscript_expression "puVar5[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar5 = puVar5 + 3;" (assignment_expression "puVar5 = puVar5 + 3" identifier = (binary_expression "puVar5 + 3" identifier + number_literal)) ;) (expression_statement "puVar8 = puVar8 + -3;" (assignment_expression "puVar8 = puVar8 + -3" identifier = (binary_expression "puVar8 + -3" identifier + number_literal)) ;) }) while (parenthesized_expression "((iVar10 + iVar6) - iVar7 < iVar7)" ( (binary_expression "(iVar10 + iVar6) - iVar7 < iVar7" (binary_expression "(iVar10 + iVar6) - iVar7" (parenthesized_expression "(iVar10 + iVar6)" ( (binary_expression "iVar10 + iVar6" identifier + identifier) )) - identifier) < identifier) )) ;) (expression_statement "iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);" (assignment_expression "iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1)" identifier = (binary_expression "iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1)" (binary_expression "iVar10 + 1" identifier + number_literal) + (parenthesized_expression "((uint)((iVar6 + -1) - iVar10) >> 1)" ( (binary_expression "(uint)((iVar6 + -1) - iVar10) >> 1" (call_expression "(uint)((iVar6 + -1) - iVar10)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((iVar6 + -1) - iVar10)" ( (binary_expression "(iVar6 + -1) - iVar10" (parenthesized_expression "(iVar6 + -1)" ( (binary_expression "iVar6 + -1" identifier + number_literal) )) - identifier) ))) >> number_literal) )))) ;) })) (if_statement "if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }" if (parenthesized_expression "(iVar10 <= iVar9)" ( (binary_expression "iVar10 <= iVar9" identifier <= identifier) )) (compound_statement "{\n        iVar10 = iVar9;\n      }" { (expression_statement "iVar10 = iVar9;" (assignment_expression "iVar10 = iVar9" identifier = identifier) ;) })) (if_statement "if (param_4 <= iVar10) {\n        return;\n      }" if (parenthesized_expression "(param_4 <= iVar10)" ( (binary_expression "param_4 <= iVar10" identifier <= identifier) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) })) })) (return_statement "return;" return ;) })))
(translation_unit "void flipThisRun(bidi_char *from,uchar *level,int max,int count)\n\n{\n  byte bVar1;\n  ushort uVar2;\n  uint uVar3;\n  uint uVar4;\n  undefined2 uVar5;\n  bidi_char *pbVar6;\n  int iVar7;\n  int iVar8;\n  bidi_char *pbVar9;\n  int iVar10;\n  int iVar11;\n  \n  iVar10 = 0;\n  if (0 < count) {\n    while (iVar10 < count) {\n      bVar1 = level[iVar10];\n      iVar11 = iVar10;\n      while (iVar10 = iVar11, max != (uint)bVar1) {\n        iVar11 = iVar11 + 1;\n        if (count == iVar11) {\n          return;\n        }\n        bVar1 = level[iVar11];\n      }\n      do {\n        iVar7 = iVar10;\n        iVar10 = iVar7 + 1;\n        if (count <= iVar10) break;\n      } while (max <= (int)(uint)level[iVar7 + 1]);\n      if (iVar11 < iVar7) {\n        pbVar6 = from + iVar11;\n        iVar8 = iVar7;\n        pbVar9 = from + iVar7;\n        do {\n          uVar3 = pbVar9->origwc;\n          iVar8 = iVar8 + -1;\n          uVar2 = pbVar9->index;\n          uVar4 = pbVar9->wc;\n          pbVar9->origwc = pbVar6->origwc;\n          pbVar9->wc = pbVar6->wc;\n          uVar5 = *(undefined2 *)&pbVar6->field_0xa;\n          pbVar9->index = pbVar6->index;\n          *(undefined2 *)&pbVar9->field_0xa = uVar5;\n          pbVar6->index = uVar2;\n          pbVar6->origwc = uVar3;\n          pbVar6->wc = uVar4;\n          pbVar6 = pbVar6 + 1;\n          pbVar9 = pbVar9 + -1;\n        } while ((iVar11 + iVar7) - iVar8 < iVar8);\n        iVar11 = iVar11 + 1 + ((uint)((iVar7 + -1) - iVar11) >> 1);\n      }\n      if (iVar11 <= iVar10) {\n        iVar11 = iVar10;\n      }\n      if (count <= iVar11) {\n        return;\n      }\n    }\n  }\n  return;\n}\n\n" (function_definition "void flipThisRun(bidi_char *from,uchar *level,int max,int count)\n\n{\n  byte bVar1;\n  ushort uVar2;\n  uint uVar3;\n  uint uVar4;\n  undefined2 uVar5;\n  bidi_char *pbVar6;\n  int iVar7;\n  int iVar8;\n  bidi_char *pbVar9;\n  int iVar10;\n  int iVar11;\n  \n  iVar10 = 0;\n  if (0 < count) {\n    while (iVar10 < count) {\n      bVar1 = level[iVar10];\n      iVar11 = iVar10;\n      while (iVar10 = iVar11, max != (uint)bVar1) {\n        iVar11 = iVar11 + 1;\n        if (count == iVar11) {\n          return;\n        }\n        bVar1 = level[iVar11];\n      }\n      do {\n        iVar7 = iVar10;\n        iVar10 = iVar7 + 1;\n        if (count <= iVar10) break;\n      } while (max <= (int)(uint)level[iVar7 + 1]);\n      if (iVar11 < iVar7) {\n        pbVar6 = from + iVar11;\n        iVar8 = iVar7;\n        pbVar9 = from + iVar7;\n        do {\n          uVar3 = pbVar9->origwc;\n          iVar8 = iVar8 + -1;\n          uVar2 = pbVar9->index;\n          uVar4 = pbVar9->wc;\n          pbVar9->origwc = pbVar6->origwc;\n          pbVar9->wc = pbVar6->wc;\n          uVar5 = *(undefined2 *)&pbVar6->field_0xa;\n          pbVar9->index = pbVar6->index;\n          *(undefined2 *)&pbVar9->field_0xa = uVar5;\n          pbVar6->index = uVar2;\n          pbVar6->origwc = uVar3;\n          pbVar6->wc = uVar4;\n          pbVar6 = pbVar6 + 1;\n          pbVar9 = pbVar9 + -1;\n        } while ((iVar11 + iVar7) - iVar8 < iVar8);\n        iVar11 = iVar11 + 1 + ((uint)((iVar7 + -1) - iVar11) >> 1);\n      }\n      if (iVar11 <= iVar10) {\n        iVar11 = iVar10;\n      }\n      if (count <= iVar11) {\n        return;\n      }\n    }\n  }\n  return;\n}" primitive_type (function_declarator "flipThisRun(bidi_char *from,uchar *level,int max,int count)" identifier (parameter_list "(bidi_char *from,uchar *level,int max,int count)" ( (parameter_declaration "bidi_char *from" type_identifier (pointer_declarator "*from" * identifier)) , (parameter_declaration "uchar *level" type_identifier (pointer_declarator "*level" * identifier)) , (parameter_declaration "int max" primitive_type identifier) , (parameter_declaration "int count" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  ushort uVar2;\n  uint uVar3;\n  uint uVar4;\n  undefined2 uVar5;\n  bidi_char *pbVar6;\n  int iVar7;\n  int iVar8;\n  bidi_char *pbVar9;\n  int iVar10;\n  int iVar11;\n  \n  iVar10 = 0;\n  if (0 < count) {\n    while (iVar10 < count) {\n      bVar1 = level[iVar10];\n      iVar11 = iVar10;\n      while (iVar10 = iVar11, max != (uint)bVar1) {\n        iVar11 = iVar11 + 1;\n        if (count == iVar11) {\n          return;\n        }\n        bVar1 = level[iVar11];\n      }\n      do {\n        iVar7 = iVar10;\n        iVar10 = iVar7 + 1;\n        if (count <= iVar10) break;\n      } while (max <= (int)(uint)level[iVar7 + 1]);\n      if (iVar11 < iVar7) {\n        pbVar6 = from + iVar11;\n        iVar8 = iVar7;\n        pbVar9 = from + iVar7;\n        do {\n          uVar3 = pbVar9->origwc;\n          iVar8 = iVar8 + -1;\n          uVar2 = pbVar9->index;\n          uVar4 = pbVar9->wc;\n          pbVar9->origwc = pbVar6->origwc;\n          pbVar9->wc = pbVar6->wc;\n          uVar5 = *(undefined2 *)&pbVar6->field_0xa;\n          pbVar9->index = pbVar6->index;\n          *(undefined2 *)&pbVar9->field_0xa = uVar5;\n          pbVar6->index = uVar2;\n          pbVar6->origwc = uVar3;\n          pbVar6->wc = uVar4;\n          pbVar6 = pbVar6 + 1;\n          pbVar9 = pbVar9 + -1;\n        } while ((iVar11 + iVar7) - iVar8 < iVar8);\n        iVar11 = iVar11 + 1 + ((uint)((iVar7 + -1) - iVar11) >> 1);\n      }\n      if (iVar11 <= iVar10) {\n        iVar11 = iVar10;\n      }\n      if (count <= iVar11) {\n        return;\n      }\n    }\n  }\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "ushort uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "undefined2 uVar5;" type_identifier identifier ;) (declaration "bidi_char *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "bidi_char *pbVar9;" type_identifier (pointer_declarator "*pbVar9" * identifier) ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "int iVar11;" primitive_type identifier ;) (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (if_statement "if (0 < count) {\n    while (iVar10 < count) {\n      bVar1 = level[iVar10];\n      iVar11 = iVar10;\n      while (iVar10 = iVar11, max != (uint)bVar1) {\n        iVar11 = iVar11 + 1;\n        if (count == iVar11) {\n          return;\n        }\n        bVar1 = level[iVar11];\n      }\n      do {\n        iVar7 = iVar10;\n        iVar10 = iVar7 + 1;\n        if (count <= iVar10) break;\n      } while (max <= (int)(uint)level[iVar7 + 1]);\n      if (iVar11 < iVar7) {\n        pbVar6 = from + iVar11;\n        iVar8 = iVar7;\n        pbVar9 = from + iVar7;\n        do {\n          uVar3 = pbVar9->origwc;\n          iVar8 = iVar8 + -1;\n          uVar2 = pbVar9->index;\n          uVar4 = pbVar9->wc;\n          pbVar9->origwc = pbVar6->origwc;\n          pbVar9->wc = pbVar6->wc;\n          uVar5 = *(undefined2 *)&pbVar6->field_0xa;\n          pbVar9->index = pbVar6->index;\n          *(undefined2 *)&pbVar9->field_0xa = uVar5;\n          pbVar6->index = uVar2;\n          pbVar6->origwc = uVar3;\n          pbVar6->wc = uVar4;\n          pbVar6 = pbVar6 + 1;\n          pbVar9 = pbVar9 + -1;\n        } while ((iVar11 + iVar7) - iVar8 < iVar8);\n        iVar11 = iVar11 + 1 + ((uint)((iVar7 + -1) - iVar11) >> 1);\n      }\n      if (iVar11 <= iVar10) {\n        iVar11 = iVar10;\n      }\n      if (count <= iVar11) {\n        return;\n      }\n    }\n  }" if (parenthesized_expression "(0 < count)" ( (binary_expression "0 < count" number_literal < identifier) )) (compound_statement "{\n    while (iVar10 < count) {\n      bVar1 = level[iVar10];\n      iVar11 = iVar10;\n      while (iVar10 = iVar11, max != (uint)bVar1) {\n        iVar11 = iVar11 + 1;\n        if (count == iVar11) {\n          return;\n        }\n        bVar1 = level[iVar11];\n      }\n      do {\n        iVar7 = iVar10;\n        iVar10 = iVar7 + 1;\n        if (count <= iVar10) break;\n      } while (max <= (int)(uint)level[iVar7 + 1]);\n      if (iVar11 < iVar7) {\n        pbVar6 = from + iVar11;\n        iVar8 = iVar7;\n        pbVar9 = from + iVar7;\n        do {\n          uVar3 = pbVar9->origwc;\n          iVar8 = iVar8 + -1;\n          uVar2 = pbVar9->index;\n          uVar4 = pbVar9->wc;\n          pbVar9->origwc = pbVar6->origwc;\n          pbVar9->wc = pbVar6->wc;\n          uVar5 = *(undefined2 *)&pbVar6->field_0xa;\n          pbVar9->index = pbVar6->index;\n          *(undefined2 *)&pbVar9->field_0xa = uVar5;\n          pbVar6->index = uVar2;\n          pbVar6->origwc = uVar3;\n          pbVar6->wc = uVar4;\n          pbVar6 = pbVar6 + 1;\n          pbVar9 = pbVar9 + -1;\n        } while ((iVar11 + iVar7) - iVar8 < iVar8);\n        iVar11 = iVar11 + 1 + ((uint)((iVar7 + -1) - iVar11) >> 1);\n      }\n      if (iVar11 <= iVar10) {\n        iVar11 = iVar10;\n      }\n      if (count <= iVar11) {\n        return;\n      }\n    }\n  }" { (while_statement "while (iVar10 < count) {\n      bVar1 = level[iVar10];\n      iVar11 = iVar10;\n      while (iVar10 = iVar11, max != (uint)bVar1) {\n        iVar11 = iVar11 + 1;\n        if (count == iVar11) {\n          return;\n        }\n        bVar1 = level[iVar11];\n      }\n      do {\n        iVar7 = iVar10;\n        iVar10 = iVar7 + 1;\n        if (count <= iVar10) break;\n      } while (max <= (int)(uint)level[iVar7 + 1]);\n      if (iVar11 < iVar7) {\n        pbVar6 = from + iVar11;\n        iVar8 = iVar7;\n        pbVar9 = from + iVar7;\n        do {\n          uVar3 = pbVar9->origwc;\n          iVar8 = iVar8 + -1;\n          uVar2 = pbVar9->index;\n          uVar4 = pbVar9->wc;\n          pbVar9->origwc = pbVar6->origwc;\n          pbVar9->wc = pbVar6->wc;\n          uVar5 = *(undefined2 *)&pbVar6->field_0xa;\n          pbVar9->index = pbVar6->index;\n          *(undefined2 *)&pbVar9->field_0xa = uVar5;\n          pbVar6->index = uVar2;\n          pbVar6->origwc = uVar3;\n          pbVar6->wc = uVar4;\n          pbVar6 = pbVar6 + 1;\n          pbVar9 = pbVar9 + -1;\n        } while ((iVar11 + iVar7) - iVar8 < iVar8);\n        iVar11 = iVar11 + 1 + ((uint)((iVar7 + -1) - iVar11) >> 1);\n      }\n      if (iVar11 <= iVar10) {\n        iVar11 = iVar10;\n      }\n      if (count <= iVar11) {\n        return;\n      }\n    }" while (parenthesized_expression "(iVar10 < count)" ( (binary_expression "iVar10 < count" identifier < identifier) )) (compound_statement "{\n      bVar1 = level[iVar10];\n      iVar11 = iVar10;\n      while (iVar10 = iVar11, max != (uint)bVar1) {\n        iVar11 = iVar11 + 1;\n        if (count == iVar11) {\n          return;\n        }\n        bVar1 = level[iVar11];\n      }\n      do {\n        iVar7 = iVar10;\n        iVar10 = iVar7 + 1;\n        if (count <= iVar10) break;\n      } while (max <= (int)(uint)level[iVar7 + 1]);\n      if (iVar11 < iVar7) {\n        pbVar6 = from + iVar11;\n        iVar8 = iVar7;\n        pbVar9 = from + iVar7;\n        do {\n          uVar3 = pbVar9->origwc;\n          iVar8 = iVar8 + -1;\n          uVar2 = pbVar9->index;\n          uVar4 = pbVar9->wc;\n          pbVar9->origwc = pbVar6->origwc;\n          pbVar9->wc = pbVar6->wc;\n          uVar5 = *(undefined2 *)&pbVar6->field_0xa;\n          pbVar9->index = pbVar6->index;\n          *(undefined2 *)&pbVar9->field_0xa = uVar5;\n          pbVar6->index = uVar2;\n          pbVar6->origwc = uVar3;\n          pbVar6->wc = uVar4;\n          pbVar6 = pbVar6 + 1;\n          pbVar9 = pbVar9 + -1;\n        } while ((iVar11 + iVar7) - iVar8 < iVar8);\n        iVar11 = iVar11 + 1 + ((uint)((iVar7 + -1) - iVar11) >> 1);\n      }\n      if (iVar11 <= iVar10) {\n        iVar11 = iVar10;\n      }\n      if (count <= iVar11) {\n        return;\n      }\n    }" { (expression_statement "bVar1 = level[iVar10];" (assignment_expression "bVar1 = level[iVar10]" identifier = (subscript_expression "level[iVar10]" identifier [ identifier ])) ;) (expression_statement "iVar11 = iVar10;" (assignment_expression "iVar11 = iVar10" identifier = identifier) ;) (while_statement "while (iVar10 = iVar11, max != (uint)bVar1) {\n        iVar11 = iVar11 + 1;\n        if (count == iVar11) {\n          return;\n        }\n        bVar1 = level[iVar11];\n      }" while (parenthesized_expression "(iVar10 = iVar11, max != (uint)bVar1)" ( (comma_expression "iVar10 = iVar11, max != (uint)bVar1" (assignment_expression "iVar10 = iVar11" identifier = identifier) , (binary_expression "max != (uint)bVar1" identifier != (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier))) )) (compound_statement "{\n        iVar11 = iVar11 + 1;\n        if (count == iVar11) {\n          return;\n        }\n        bVar1 = level[iVar11];\n      }" { (expression_statement "iVar11 = iVar11 + 1;" (assignment_expression "iVar11 = iVar11 + 1" identifier = (binary_expression "iVar11 + 1" identifier + number_literal)) ;) (if_statement "if (count == iVar11) {\n          return;\n        }" if (parenthesized_expression "(count == iVar11)" ( (binary_expression "count == iVar11" identifier == identifier) )) (compound_statement "{\n          return;\n        }" { (return_statement "return;" return ;) })) (expression_statement "bVar1 = level[iVar11];" (assignment_expression "bVar1 = level[iVar11]" identifier = (subscript_expression "level[iVar11]" identifier [ identifier ])) ;) })) (do_statement "do {\n        iVar7 = iVar10;\n        iVar10 = iVar7 + 1;\n        if (count <= iVar10) break;\n      } while (max <= (int)(uint)level[iVar7 + 1]);" do (compound_statement "{\n        iVar7 = iVar10;\n        iVar10 = iVar7 + 1;\n        if (count <= iVar10) break;\n      }" { (expression_statement "iVar7 = iVar10;" (assignment_expression "iVar7 = iVar10" identifier = identifier) ;) (expression_statement "iVar10 = iVar7 + 1;" (assignment_expression "iVar10 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) (if_statement "if (count <= iVar10) break;" if (parenthesized_expression "(count <= iVar10)" ( (binary_expression "count <= iVar10" identifier <= identifier) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(max <= (int)(uint)level[iVar7 + 1])" ( (binary_expression "max <= (int)(uint)level[iVar7 + 1]" identifier <= (cast_expression "(int)(uint)level[iVar7 + 1]" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)level[iVar7 + 1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "level[iVar7 + 1]" identifier [ (binary_expression "iVar7 + 1" identifier + number_literal) ])))) )) ;) (if_statement "if (iVar11 < iVar7) {\n        pbVar6 = from + iVar11;\n        iVar8 = iVar7;\n        pbVar9 = from + iVar7;\n        do {\n          uVar3 = pbVar9->origwc;\n          iVar8 = iVar8 + -1;\n          uVar2 = pbVar9->index;\n          uVar4 = pbVar9->wc;\n          pbVar9->origwc = pbVar6->origwc;\n          pbVar9->wc = pbVar6->wc;\n          uVar5 = *(undefined2 *)&pbVar6->field_0xa;\n          pbVar9->index = pbVar6->index;\n          *(undefined2 *)&pbVar9->field_0xa = uVar5;\n          pbVar6->index = uVar2;\n          pbVar6->origwc = uVar3;\n          pbVar6->wc = uVar4;\n          pbVar6 = pbVar6 + 1;\n          pbVar9 = pbVar9 + -1;\n        } while ((iVar11 + iVar7) - iVar8 < iVar8);\n        iVar11 = iVar11 + 1 + ((uint)((iVar7 + -1) - iVar11) >> 1);\n      }" if (parenthesized_expression "(iVar11 < iVar7)" ( (binary_expression "iVar11 < iVar7" identifier < identifier) )) (compound_statement "{\n        pbVar6 = from + iVar11;\n        iVar8 = iVar7;\n        pbVar9 = from + iVar7;\n        do {\n          uVar3 = pbVar9->origwc;\n          iVar8 = iVar8 + -1;\n          uVar2 = pbVar9->index;\n          uVar4 = pbVar9->wc;\n          pbVar9->origwc = pbVar6->origwc;\n          pbVar9->wc = pbVar6->wc;\n          uVar5 = *(undefined2 *)&pbVar6->field_0xa;\n          pbVar9->index = pbVar6->index;\n          *(undefined2 *)&pbVar9->field_0xa = uVar5;\n          pbVar6->index = uVar2;\n          pbVar6->origwc = uVar3;\n          pbVar6->wc = uVar4;\n          pbVar6 = pbVar6 + 1;\n          pbVar9 = pbVar9 + -1;\n        } while ((iVar11 + iVar7) - iVar8 < iVar8);\n        iVar11 = iVar11 + 1 + ((uint)((iVar7 + -1) - iVar11) >> 1);\n      }" { (expression_statement "pbVar6 = from + iVar11;" (assignment_expression "pbVar6 = from + iVar11" identifier = (binary_expression "from + iVar11" identifier + identifier)) ;) (expression_statement "iVar8 = iVar7;" (assignment_expression "iVar8 = iVar7" identifier = identifier) ;) (expression_statement "pbVar9 = from + iVar7;" (assignment_expression "pbVar9 = from + iVar7" identifier = (binary_expression "from + iVar7" identifier + identifier)) ;) (do_statement "do {\n          uVar3 = pbVar9->origwc;\n          iVar8 = iVar8 + -1;\n          uVar2 = pbVar9->index;\n          uVar4 = pbVar9->wc;\n          pbVar9->origwc = pbVar6->origwc;\n          pbVar9->wc = pbVar6->wc;\n          uVar5 = *(undefined2 *)&pbVar6->field_0xa;\n          pbVar9->index = pbVar6->index;\n          *(undefined2 *)&pbVar9->field_0xa = uVar5;\n          pbVar6->index = uVar2;\n          pbVar6->origwc = uVar3;\n          pbVar6->wc = uVar4;\n          pbVar6 = pbVar6 + 1;\n          pbVar9 = pbVar9 + -1;\n        } while ((iVar11 + iVar7) - iVar8 < iVar8);" do (compound_statement "{\n          uVar3 = pbVar9->origwc;\n          iVar8 = iVar8 + -1;\n          uVar2 = pbVar9->index;\n          uVar4 = pbVar9->wc;\n          pbVar9->origwc = pbVar6->origwc;\n          pbVar9->wc = pbVar6->wc;\n          uVar5 = *(undefined2 *)&pbVar6->field_0xa;\n          pbVar9->index = pbVar6->index;\n          *(undefined2 *)&pbVar9->field_0xa = uVar5;\n          pbVar6->index = uVar2;\n          pbVar6->origwc = uVar3;\n          pbVar6->wc = uVar4;\n          pbVar6 = pbVar6 + 1;\n          pbVar9 = pbVar9 + -1;\n        }" { (expression_statement "uVar3 = pbVar9->origwc;" (assignment_expression "uVar3 = pbVar9->origwc" identifier = (field_expression "pbVar9->origwc" identifier -> field_identifier)) ;) (expression_statement "iVar8 = iVar8 + -1;" (assignment_expression "iVar8 = iVar8 + -1" identifier = (binary_expression "iVar8 + -1" identifier + number_literal)) ;) (expression_statement "uVar2 = pbVar9->index;" (assignment_expression "uVar2 = pbVar9->index" identifier = (field_expression "pbVar9->index" identifier -> field_identifier)) ;) (expression_statement "uVar4 = pbVar9->wc;" (assignment_expression "uVar4 = pbVar9->wc" identifier = (field_expression "pbVar9->wc" identifier -> field_identifier)) ;) (expression_statement "pbVar9->origwc = pbVar6->origwc;" (assignment_expression "pbVar9->origwc = pbVar6->origwc" (field_expression "pbVar9->origwc" identifier -> field_identifier) = (field_expression "pbVar6->origwc" identifier -> field_identifier)) ;) (expression_statement "pbVar9->wc = pbVar6->wc;" (assignment_expression "pbVar9->wc = pbVar6->wc" (field_expression "pbVar9->wc" identifier -> field_identifier) = (field_expression "pbVar6->wc" identifier -> field_identifier)) ;) (expression_statement "uVar5 = *(undefined2 *)&pbVar6->field_0xa;" (assignment_expression "uVar5 = *(undefined2 *)&pbVar6->field_0xa" identifier = (pointer_expression "*(undefined2 *)&pbVar6->field_0xa" * (cast_expression "(undefined2 *)&pbVar6->field_0xa" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pbVar6->field_0xa" & (field_expression "pbVar6->field_0xa" identifier -> field_identifier))))) ;) (expression_statement "pbVar9->index = pbVar6->index;" (assignment_expression "pbVar9->index = pbVar6->index" (field_expression "pbVar9->index" identifier -> field_identifier) = (field_expression "pbVar6->index" identifier -> field_identifier)) ;) (expression_statement "*(undefined2 *)&pbVar9->field_0xa = uVar5;" (assignment_expression "*(undefined2 *)&pbVar9->field_0xa = uVar5" (pointer_expression "*(undefined2 *)&pbVar9->field_0xa" * (cast_expression "(undefined2 *)&pbVar9->field_0xa" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pbVar9->field_0xa" & (field_expression "pbVar9->field_0xa" identifier -> field_identifier)))) = identifier) ;) (expression_statement "pbVar6->index = uVar2;" (assignment_expression "pbVar6->index = uVar2" (field_expression "pbVar6->index" identifier -> field_identifier) = identifier) ;) (expression_statement "pbVar6->origwc = uVar3;" (assignment_expression "pbVar6->origwc = uVar3" (field_expression "pbVar6->origwc" identifier -> field_identifier) = identifier) ;) (expression_statement "pbVar6->wc = uVar4;" (assignment_expression "pbVar6->wc = uVar4" (field_expression "pbVar6->wc" identifier -> field_identifier) = identifier) ;) (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "pbVar9 = pbVar9 + -1;" (assignment_expression "pbVar9 = pbVar9 + -1" identifier = (binary_expression "pbVar9 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "((iVar11 + iVar7) - iVar8 < iVar8)" ( (binary_expression "(iVar11 + iVar7) - iVar8 < iVar8" (binary_expression "(iVar11 + iVar7) - iVar8" (parenthesized_expression "(iVar11 + iVar7)" ( (binary_expression "iVar11 + iVar7" identifier + identifier) )) - identifier) < identifier) )) ;) (expression_statement "iVar11 = iVar11 + 1 + ((uint)((iVar7 + -1) - iVar11) >> 1);" (assignment_expression "iVar11 = iVar11 + 1 + ((uint)((iVar7 + -1) - iVar11) >> 1)" identifier = (binary_expression "iVar11 + 1 + ((uint)((iVar7 + -1) - iVar11) >> 1)" (binary_expression "iVar11 + 1" identifier + number_literal) + (parenthesized_expression "((uint)((iVar7 + -1) - iVar11) >> 1)" ( (binary_expression "(uint)((iVar7 + -1) - iVar11) >> 1" (call_expression "(uint)((iVar7 + -1) - iVar11)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((iVar7 + -1) - iVar11)" ( (binary_expression "(iVar7 + -1) - iVar11" (parenthesized_expression "(iVar7 + -1)" ( (binary_expression "iVar7 + -1" identifier + number_literal) )) - identifier) ))) >> number_literal) )))) ;) })) (if_statement "if (iVar11 <= iVar10) {\n        iVar11 = iVar10;\n      }" if (parenthesized_expression "(iVar11 <= iVar10)" ( (binary_expression "iVar11 <= iVar10" identifier <= identifier) )) (compound_statement "{\n        iVar11 = iVar10;\n      }" { (expression_statement "iVar11 = iVar10;" (assignment_expression "iVar11 = iVar10" identifier = identifier) ;) })) (if_statement "if (count <= iVar11) {\n        return;\n      }" if (parenthesized_expression "(count <= iVar11)" ( (binary_expression "count <= iVar11" identifier <= identifier) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) })) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0002c050(int param_1,int param_2,uint param_3,int param_4)\n\n{\n  byte bVar1;\n  undefined2 uVar2;\n  undefined4 uVar3;\n  undefined4 uVar4;\n  undefined4 *puVar5;\n  int iVar6;\n  int iVar7;\n  undefined4 *puVar8;\n  int iVar9;\n  int iVar10;\n  \n  iVar9 = 0;\n  if (0 < param_4) {\n    while (iVar9 < param_4) {\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_0002c050(int param_1,int param_2,uint param_3,int param_4)\n\n{\n  byte bVar1;\n  undefined2 uVar2;\n  undefined4 uVar3;\n  undefined4 uVar4;\n  undefined4 *puVar5;\n  int iVar6;\n  int iVar7;\n  undefined4 *puVar8;\n  int iVar9;\n  int iVar10;\n  \n  iVar9 = 0;\n  if (0 < param_4) {\n    while (iVar9 < param_4) {\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0002c050(int param_1,int param_2,uint param_3,int param_4)" identifier (parameter_list "(int param_1,int param_2,uint param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  undefined2 uVar2;\n  undefined4 uVar3;\n  undefined4 uVar4;\n  undefined4 *puVar5;\n  int iVar6;\n  int iVar7;\n  undefined4 *puVar8;\n  int iVar9;\n  int iVar10;\n  \n  iVar9 = 0;\n  if (0 < param_4) {\n    while (iVar9 < param_4) {\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }\n  }\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined2 uVar2;" type_identifier identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "undefined4 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "undefined4 *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "int iVar10;" primitive_type identifier ;) (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" identifier = number_literal) ;) (if_statement "if (0 < param_4) {\n    while (iVar9 < param_4) {\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }\n  }" if (parenthesized_expression "(0 < param_4)" ( (binary_expression "0 < param_4" number_literal < identifier) )) (compound_statement "{\n    while (iVar9 < param_4) {\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }\n  }" { (while_statement "while (iVar9 < param_4) {\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }" while (parenthesized_expression "(iVar9 < param_4)" ( (binary_expression "iVar9 < param_4" identifier < identifier) )) (compound_statement "{\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }" { (expression_statement "bVar1 = *(byte *)(param_2 + iVar9);" (assignment_expression "bVar1 = *(byte *)(param_2 + iVar9)" identifier = (pointer_expression "*(byte *)(param_2 + iVar9)" * (cast_expression "(byte *)(param_2 + iVar9)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + iVar9)" ( (binary_expression "param_2 + iVar9" identifier + identifier) ))))) ;) (expression_statement "iVar10 = iVar9;" (assignment_expression "iVar10 = iVar9" identifier = identifier) ;) (while_statement "while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }" while (parenthesized_expression "(iVar9 = iVar10, param_3 != bVar1)" ( (comma_expression "iVar9 = iVar10, param_3 != bVar1" (assignment_expression "iVar9 = iVar10" identifier = identifier) , (binary_expression "param_3 != bVar1" identifier != identifier)) )) (compound_statement "{\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }" { (expression_statement "iVar10 = iVar10 + 1;" (assignment_expression "iVar10 = iVar10 + 1" identifier = (binary_expression "iVar10 + 1" identifier + number_literal)) ;) (if_statement "if (param_4 == iVar10) {\n          return;\n        }" if (parenthesized_expression "(param_4 == iVar10)" ( (binary_expression "param_4 == iVar10" identifier == identifier) )) (compound_statement "{\n          return;\n        }" { (return_statement "return;" return ;) })) (expression_statement "bVar1 = *(byte *)(param_2 + iVar10);" (assignment_expression "bVar1 = *(byte *)(param_2 + iVar10)" identifier = (pointer_expression "*(byte *)(param_2 + iVar10)" * (cast_expression "(byte *)(param_2 + iVar10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + iVar10)" ( (binary_expression "param_2 + iVar10" identifier + identifier) ))))) ;) })) (do_statement "do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));" do (compound_statement "{\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      }" { (expression_statement "iVar6 = iVar9;" (assignment_expression "iVar6 = iVar9" identifier = identifier) ;) (expression_statement "iVar9 = iVar6 + 1;" (assignment_expression "iVar9 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (if_statement "if (param_4 <= iVar9) break;" if (parenthesized_expression "(param_4 <= iVar9)" ( (binary_expression "param_4 <= iVar9" identifier <= identifier) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6))" ( (binary_expression "(int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6)" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) <= (binary_expression "(int)(uint)*(byte *)(param_2 + 1 + iVar6)" (cast_expression "(int)(uint)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(byte *)(param_2 + 1 + iVar6)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 1 + iVar6)" ( (binary_expression "param_2 + 1 + iVar6" (binary_expression "param_2 + 1" identifier + number_literal) + identifier) ))))) )) ;) (if_statement "if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }" if (parenthesized_expression "(iVar10 < iVar6)" ( (binary_expression "iVar10 < iVar6" identifier < identifier) )) (compound_statement "{\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }" { (expression_statement "puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);" (assignment_expression "puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc)" identifier = (cast_expression "(undefined4 *)(param_1 + iVar10 * 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar10 * 0xc)" ( (binary_expression "param_1 + iVar10 * 0xc" identifier + (binary_expression "iVar10 * 0xc" identifier * number_literal)) )))) ;) (expression_statement "iVar7 = iVar6;" (assignment_expression "iVar7 = iVar6" identifier = identifier) ;) (expression_statement "puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);" (assignment_expression "puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc)" identifier = (cast_expression "(undefined4 *)(param_1 + iVar6 * 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar6 * 0xc)" ( (binary_expression "param_1 + iVar6 * 0xc" identifier + (binary_expression "iVar6 * 0xc" identifier * number_literal)) )))) ;) (do_statement "do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);" do (compound_statement "{\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        }" { (expression_statement "uVar3 = *puVar8;" (assignment_expression "uVar3 = *puVar8" identifier = (pointer_expression "*puVar8" * identifier)) ;) (expression_statement "iVar7 = iVar7 + -1;" (assignment_expression "iVar7 = iVar7 + -1" identifier = (binary_expression "iVar7 + -1" identifier + number_literal)) ;) (expression_statement "uVar2 = *(undefined2 *)(puVar8 + 2);" (assignment_expression "uVar2 = *(undefined2 *)(puVar8 + 2)" identifier = (pointer_expression "*(undefined2 *)(puVar8 + 2)" * (cast_expression "(undefined2 *)(puVar8 + 2)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar8 + 2)" ( (binary_expression "puVar8 + 2" identifier + number_literal) ))))) ;) (expression_statement "uVar4 = puVar8[1];" (assignment_expression "uVar4 = puVar8[1]" identifier = (subscript_expression "puVar8[1]" identifier [ number_literal ])) ;) (expression_statement "*puVar8 = *puVar5;" (assignment_expression "*puVar8 = *puVar5" (pointer_expression "*puVar8" * identifier) = (pointer_expression "*puVar5" * identifier)) ;) (expression_statement "puVar8[1] = puVar5[1];" (assignment_expression "puVar8[1] = puVar5[1]" (subscript_expression "puVar8[1]" identifier [ number_literal ]) = (subscript_expression "puVar5[1]" identifier [ number_literal ])) ;) (expression_statement "puVar8[2] = puVar5[2];" (assignment_expression "puVar8[2] = puVar5[2]" (subscript_expression "puVar8[2]" identifier [ number_literal ]) = (subscript_expression "puVar5[2]" identifier [ number_literal ])) ;) (expression_statement "*(undefined2 *)(puVar5 + 2) = uVar2;" (assignment_expression "*(undefined2 *)(puVar5 + 2) = uVar2" (pointer_expression "*(undefined2 *)(puVar5 + 2)" * (cast_expression "(undefined2 *)(puVar5 + 2)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar5 + 2)" ( (binary_expression "puVar5 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "*puVar5 = uVar3;" (assignment_expression "*puVar5 = uVar3" (pointer_expression "*puVar5" * identifier) = identifier) ;) (expression_statement "puVar5[1] = uVar4;" (assignment_expression "puVar5[1] = uVar4" (subscript_expression "puVar5[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar5 = puVar5 + 3;" (assignment_expression "puVar5 = puVar5 + 3" identifier = (binary_expression "puVar5 + 3" identifier + number_literal)) ;) (expression_statement "puVar8 = puVar8 + -3;" (assignment_expression "puVar8 = puVar8 + -3" identifier = (binary_expression "puVar8 + -3" identifier + number_literal)) ;) }) while (parenthesized_expression "((iVar10 + iVar6) - iVar7 < iVar7)" ( (binary_expression "(iVar10 + iVar6) - iVar7 < iVar7" (binary_expression "(iVar10 + iVar6) - iVar7" (parenthesized_expression "(iVar10 + iVar6)" ( (binary_expression "iVar10 + iVar6" identifier + identifier) )) - identifier) < identifier) )) ;) (expression_statement "iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);" (assignment_expression "iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1)" identifier = (binary_expression "iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1)" (binary_expression "iVar10 + 1" identifier + number_literal) + (parenthesized_expression "((uint)((iVar6 + -1) - iVar10) >> 1)" ( (binary_expression "(uint)((iVar6 + -1) - iVar10) >> 1" (call_expression "(uint)((iVar6 + -1) - iVar10)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((iVar6 + -1) - iVar10)" ( (binary_expression "(iVar6 + -1) - iVar10" (parenthesized_expression "(iVar6 + -1)" ( (binary_expression "iVar6 + -1" identifier + number_literal) )) - identifier) ))) >> number_literal) )))) ;) })) (if_statement "if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }" if (parenthesized_expression "(iVar10 <= iVar9)" ( (binary_expression "iVar10 <= iVar9" identifier <= identifier) )) (compound_statement "{\n        iVar10 = iVar9;\n      }" { (expression_statement "iVar10 = iVar9;" (assignment_expression "iVar10 = iVar9" identifier = identifier) ;) })) (if_statement "if (param_4 <= iVar10) {\n        return;\n      }" if (parenthesized_expression "(param_4 <= iVar10)" ( (binary_expression "param_4 <= iVar10" identifier <= identifier) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) })) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (while_statement while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (while_statement while (parenthesized_expression ( (comma_expression (assignment_expression IDENT = IDENT) , (binary_expression IDENT != IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))))) ;) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (break_statement break ;)) }) while (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) <= (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( IDENT ))) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) ))))) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_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 IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (binary_expression (parenthesized_expression ( (binary_expression IDENT + IDENT) )) - IDENT) < IDENT) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) + (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) - IDENT) ))) >> LIT) )))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (return_statement return ;) })) })) })) (return_statement return ;) })))
(function_definition "void FUN_0002c050(int param_1,int param_2,uint param_3,int param_4)\n\n{\n  byte bVar1;\n  undefined2 uVar2;\n  undefined4 uVar3;\n  undefined4 uVar4;\n  undefined4 *puVar5;\n  int iVar6;\n  int iVar7;\n  undefined4 *puVar8;\n  int iVar9;\n  int iVar10;\n  \n  iVar9 = 0;\n  if (0 < param_4) {\n    while (iVar9 < param_4) {\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0002c050(int param_1,int param_2,uint param_3,int param_4)" (identifier "FUN_0002c050") (parameter_list "(int param_1,int param_2,uint param_3,int param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  byte bVar1;\n  undefined2 uVar2;\n  undefined4 uVar3;\n  undefined4 uVar4;\n  undefined4 *puVar5;\n  int iVar6;\n  int iVar7;\n  undefined4 *puVar8;\n  int iVar9;\n  int iVar10;\n  \n  iVar9 = 0;\n  if (0 < param_4) {\n    while (iVar9 < param_4) {\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }\n  }\n  return;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "undefined2 uVar2;" (type_identifier "undefined2") (identifier "uVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "undefined4 *puVar5;" (type_identifier "undefined4") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "undefined4 *puVar8;" (type_identifier "undefined4") (pointer_declarator "*puVar8" (* "*") (identifier "puVar8")) (; ";")) (declaration "int iVar9;" (primitive_type "int") (identifier "iVar9") (; ";")) (declaration "int iVar10;" (primitive_type "int") (identifier "iVar10") (; ";")) (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" (identifier "iVar9") (= "=") (number_literal "0")) (; ";")) (if_statement "if (0 < param_4) {\n    while (iVar9 < param_4) {\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(0 < param_4)" (( "(") (binary_expression "0 < param_4" (number_literal "0") (< "<") (identifier "param_4")) () ")")) (compound_statement "{\n    while (iVar9 < param_4) {\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }\n  }" ({ "{") (while_statement "while (iVar9 < param_4) {\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }" (while "while") (parenthesized_expression "(iVar9 < param_4)" (( "(") (binary_expression "iVar9 < param_4" (identifier "iVar9") (< "<") (identifier "param_4")) () ")")) (compound_statement "{\n      bVar1 = *(byte *)(param_2 + iVar9);\n      iVar10 = iVar9;\n      while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }\n      do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));\n      if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }\n      if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }\n      if (param_4 <= iVar10) {\n        return;\n      }\n    }" ({ "{") (expression_statement "bVar1 = *(byte *)(param_2 + iVar9);" (assignment_expression "bVar1 = *(byte *)(param_2 + iVar9)" (identifier "bVar1") (= "=") (pointer_expression "*(byte *)(param_2 + iVar9)" (* "*") (cast_expression "(byte *)(param_2 + iVar9)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + iVar9)" (( "(") (binary_expression "param_2 + iVar9" (identifier "param_2") (+ "+") (identifier "iVar9")) () ")"))))) (; ";")) (expression_statement "iVar10 = iVar9;" (assignment_expression "iVar10 = iVar9" (identifier "iVar10") (= "=") (identifier "iVar9")) (; ";")) (while_statement "while (iVar9 = iVar10, param_3 != bVar1) {\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }" (while "while") (parenthesized_expression "(iVar9 = iVar10, param_3 != bVar1)" (( "(") (comma_expression "iVar9 = iVar10, param_3 != bVar1" (assignment_expression "iVar9 = iVar10" (identifier "iVar9") (= "=") (identifier "iVar10")) (, ",") (binary_expression "param_3 != bVar1" (identifier "param_3") (!= "!=") (identifier "bVar1"))) () ")")) (compound_statement "{\n        iVar10 = iVar10 + 1;\n        if (param_4 == iVar10) {\n          return;\n        }\n        bVar1 = *(byte *)(param_2 + iVar10);\n      }" ({ "{") (expression_statement "iVar10 = iVar10 + 1;" (assignment_expression "iVar10 = iVar10 + 1" (identifier "iVar10") (= "=") (binary_expression "iVar10 + 1" (identifier "iVar10") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (param_4 == iVar10) {\n          return;\n        }" (if "if") (parenthesized_expression "(param_4 == iVar10)" (( "(") (binary_expression "param_4 == iVar10" (identifier "param_4") (== "==") (identifier "iVar10")) () ")")) (compound_statement "{\n          return;\n        }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "bVar1 = *(byte *)(param_2 + iVar10);" (assignment_expression "bVar1 = *(byte *)(param_2 + iVar10)" (identifier "bVar1") (= "=") (pointer_expression "*(byte *)(param_2 + iVar10)" (* "*") (cast_expression "(byte *)(param_2 + iVar10)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + iVar10)" (( "(") (binary_expression "param_2 + iVar10" (identifier "param_2") (+ "+") (identifier "iVar10")) () ")"))))) (; ";")) (} "}"))) (do_statement "do {\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));" (do "do") (compound_statement "{\n        iVar6 = iVar9;\n        iVar9 = iVar6 + 1;\n        if (param_4 <= iVar9) break;\n      }" ({ "{") (expression_statement "iVar6 = iVar9;" (assignment_expression "iVar6 = iVar9" (identifier "iVar6") (= "=") (identifier "iVar9")) (; ";")) (expression_statement "iVar9 = iVar6 + 1;" (assignment_expression "iVar9 = iVar6 + 1" (identifier "iVar9") (= "=") (binary_expression "iVar6 + 1" (identifier "iVar6") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (param_4 <= iVar9) break;" (if "if") (parenthesized_expression "(param_4 <= iVar9)" (( "(") (binary_expression "param_4 <= iVar9" (identifier "param_4") (<= "<=") (identifier "iVar9")) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}")) (while "while") (parenthesized_expression "((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6))" (( "(") (binary_expression "(int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6)" (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3")) (<= "<=") (binary_expression "(int)(uint)*(byte *)(param_2 + 1 + iVar6)" (cast_expression "(int)(uint)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")"))) (* "*") (cast_expression "(byte *)(param_2 + 1 + iVar6)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 1 + iVar6)" (( "(") (binary_expression "param_2 + 1 + iVar6" (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1")) (+ "+") (identifier "iVar6")) () ")"))))) () ")")) (; ";")) (if_statement "if (iVar10 < iVar6) {\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }" (if "if") (parenthesized_expression "(iVar10 < iVar6)" (( "(") (binary_expression "iVar10 < iVar6" (identifier "iVar10") (< "<") (identifier "iVar6")) () ")")) (compound_statement "{\n        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);\n        iVar7 = iVar6;\n        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);\n        do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);\n        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);\n      }" ({ "{") (expression_statement "puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);" (assignment_expression "puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc)" (identifier "puVar5") (= "=") (cast_expression "(undefined4 *)(param_1 + iVar10 * 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + iVar10 * 0xc)" (( "(") (binary_expression "param_1 + iVar10 * 0xc" (identifier "param_1") (+ "+") (binary_expression "iVar10 * 0xc" (identifier "iVar10") (* "*") (number_literal "0xc"))) () ")")))) (; ";")) (expression_statement "iVar7 = iVar6;" (assignment_expression "iVar7 = iVar6" (identifier "iVar7") (= "=") (identifier "iVar6")) (; ";")) (expression_statement "puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);" (assignment_expression "puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc)" (identifier "puVar8") (= "=") (cast_expression "(undefined4 *)(param_1 + iVar6 * 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + iVar6 * 0xc)" (( "(") (binary_expression "param_1 + iVar6 * 0xc" (identifier "param_1") (+ "+") (binary_expression "iVar6 * 0xc" (identifier "iVar6") (* "*") (number_literal "0xc"))) () ")")))) (; ";")) (do_statement "do {\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        } while ((iVar10 + iVar6) - iVar7 < iVar7);" (do "do") (compound_statement "{\n          uVar3 = *puVar8;\n          iVar7 = iVar7 + -1;\n          uVar2 = *(undefined2 *)(puVar8 + 2);\n          uVar4 = puVar8[1];\n          *puVar8 = *puVar5;\n          puVar8[1] = puVar5[1];\n          puVar8[2] = puVar5[2];\n          *(undefined2 *)(puVar5 + 2) = uVar2;\n          *puVar5 = uVar3;\n          puVar5[1] = uVar4;\n          puVar5 = puVar5 + 3;\n          puVar8 = puVar8 + -3;\n        }" ({ "{") (expression_statement "uVar3 = *puVar8;" (assignment_expression "uVar3 = *puVar8" (identifier "uVar3") (= "=") (pointer_expression "*puVar8" (* "*") (identifier "puVar8"))) (; ";")) (expression_statement "iVar7 = iVar7 + -1;" (assignment_expression "iVar7 = iVar7 + -1" (identifier "iVar7") (= "=") (binary_expression "iVar7 + -1" (identifier "iVar7") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "uVar2 = *(undefined2 *)(puVar8 + 2);" (assignment_expression "uVar2 = *(undefined2 *)(puVar8 + 2)" (identifier "uVar2") (= "=") (pointer_expression "*(undefined2 *)(puVar8 + 2)" (* "*") (cast_expression "(undefined2 *)(puVar8 + 2)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar8 + 2)" (( "(") (binary_expression "puVar8 + 2" (identifier "puVar8") (+ "+") (number_literal "2")) () ")"))))) (; ";")) (expression_statement "uVar4 = puVar8[1];" (assignment_expression "uVar4 = puVar8[1]" (identifier "uVar4") (= "=") (subscript_expression "puVar8[1]" (identifier "puVar8") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "*puVar8 = *puVar5;" (assignment_expression "*puVar8 = *puVar5" (pointer_expression "*puVar8" (* "*") (identifier "puVar8")) (= "=") (pointer_expression "*puVar5" (* "*") (identifier "puVar5"))) (; ";")) (expression_statement "puVar8[1] = puVar5[1];" (assignment_expression "puVar8[1] = puVar5[1]" (subscript_expression "puVar8[1]" (identifier "puVar8") ([ "[") (number_literal "1") (] "]")) (= "=") (subscript_expression "puVar5[1]" (identifier "puVar5") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "puVar8[2] = puVar5[2];" (assignment_expression "puVar8[2] = puVar5[2]" (subscript_expression "puVar8[2]" (identifier "puVar8") ([ "[") (number_literal "2") (] "]")) (= "=") (subscript_expression "puVar5[2]" (identifier "puVar5") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "*(undefined2 *)(puVar5 + 2) = uVar2;" (assignment_expression "*(undefined2 *)(puVar5 + 2) = uVar2" (pointer_expression "*(undefined2 *)(puVar5 + 2)" (* "*") (cast_expression "(undefined2 *)(puVar5 + 2)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar5 + 2)" (( "(") (binary_expression "puVar5 + 2" (identifier "puVar5") (+ "+") (number_literal "2")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "*puVar5 = uVar3;" (assignment_expression "*puVar5 = uVar3" (pointer_expression "*puVar5" (* "*") (identifier "puVar5")) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "puVar5[1] = uVar4;" (assignment_expression "puVar5[1] = uVar4" (subscript_expression "puVar5[1]" (identifier "puVar5") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar4")) (; ";")) (expression_statement "puVar5 = puVar5 + 3;" (assignment_expression "puVar5 = puVar5 + 3" (identifier "puVar5") (= "=") (binary_expression "puVar5 + 3" (identifier "puVar5") (+ "+") (number_literal "3"))) (; ";")) (expression_statement "puVar8 = puVar8 + -3;" (assignment_expression "puVar8 = puVar8 + -3" (identifier "puVar8") (= "=") (binary_expression "puVar8 + -3" (identifier "puVar8") (+ "+") (number_literal "-3"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "((iVar10 + iVar6) - iVar7 < iVar7)" (( "(") (binary_expression "(iVar10 + iVar6) - iVar7 < iVar7" (binary_expression "(iVar10 + iVar6) - iVar7" (parenthesized_expression "(iVar10 + iVar6)" (( "(") (binary_expression "iVar10 + iVar6" (identifier "iVar10") (+ "+") (identifier "iVar6")) () ")")) (- "-") (identifier "iVar7")) (< "<") (identifier "iVar7")) () ")")) (; ";")) (expression_statement "iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);" (assignment_expression "iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1)" (identifier "iVar10") (= "=") (binary_expression "iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1)" (binary_expression "iVar10 + 1" (identifier "iVar10") (+ "+") (number_literal "1")) (+ "+") (parenthesized_expression "((uint)((iVar6 + -1) - iVar10) >> 1)" (( "(") (binary_expression "(uint)((iVar6 + -1) - iVar10) >> 1" (call_expression "(uint)((iVar6 + -1) - iVar10)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((iVar6 + -1) - iVar10)" (( "(") (binary_expression "(iVar6 + -1) - iVar10" (parenthesized_expression "(iVar6 + -1)" (( "(") (binary_expression "iVar6 + -1" (identifier "iVar6") (+ "+") (number_literal "-1")) () ")")) (- "-") (identifier "iVar10")) () ")"))) (>> ">>") (number_literal "1")) () ")")))) (; ";")) (} "}"))) (if_statement "if (iVar10 <= iVar9) {\n        iVar10 = iVar9;\n      }" (if "if") (parenthesized_expression "(iVar10 <= iVar9)" (( "(") (binary_expression "iVar10 <= iVar9" (identifier "iVar10") (<= "<=") (identifier "iVar9")) () ")")) (compound_statement "{\n        iVar10 = iVar9;\n      }" ({ "{") (expression_statement "iVar10 = iVar9;" (assignment_expression "iVar10 = iVar9" (identifier "iVar10") (= "=") (identifier "iVar9")) (; ";")) (} "}"))) (if_statement "if (param_4 <= iVar10) {\n        return;\n      }" (if "if") (parenthesized_expression "(param_4 <= iVar10)" (( "(") (binary_expression "param_4 <= iVar10" (identifier "param_4") (<= "<=") (identifier "iVar10")) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}"))) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 *var_6,type_2 *level,int var_3,int var_1)

{
  type_3 bVar1;
  type_4 uVar2;
  type_5 uVar3;
  type_5 uVar4;
  type_6 uVar5;
  type_1 *var_8;
  int var_5;
  int var_7;
  type_1 *var_9;
  int var_2;
  int var_4;
  
  var_2 = 0;
  if (0 < var_1) {
    while (var_2 < var_1) {
      bVar1 = level[var_2];
      var_4 = var_2;
      while (var_2 = var_4, var_3 != (type_5)bVar1) {
        var_4 = var_4 + 1;
        if (var_1 == var_4) {
          return;
        }
        bVar1 = level[var_4];
      }
      do {
        var_5 = var_2;
        var_2 = var_5 + 1;
        if (var_1 <= var_2) break;
      } while (var_3 <= (int)(type_5)level[var_5 + 1]);
      if (var_4 < var_5) {
        var_8 = var_6 + var_4;
        var_7 = var_5;
        var_9 = var_6 + var_5;
        do {
          uVar3 = var_9->origwc;
          var_7 = var_7 + -1;
          uVar2 = var_9->index;
          uVar4 = var_9->wc;
          var_9->origwc = var_8->origwc;
          var_9->wc = var_8->wc;
          uVar5 = *(type_6 *)&var_8->field_0xa;
          var_9->index = var_8->index;
          *(type_6 *)&var_9->field_0xa = uVar5;
          var_8->index = uVar2;
          var_8->origwc = uVar3;
          var_8->wc = uVar4;
          var_8 = var_8 + 1;
          var_9 = var_9 + -1;
        } while ((var_4 + var_5) - var_7 < var_7);
        var_4 = var_4 + 1 + ((type_5)((var_5 + -1) - var_4) >> 1);
      }
      if (var_4 <= var_2) {
        var_4 = var_2;
      }
      if (var_1 <= var_4) {
        return;
      }
    }
  }
  return;
}


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

void MASKED(int param_1,int param_2,uint param_3,int param_4)

{
  byte bVar1;
  undefined2 uVar2;
  undefined4 uVar3;
  undefined4 uVar4;
  undefined4 *puVar5;
  int iVar6;
  int iVar7;
  undefined4 *puVar8;
  int iVar9;
  int iVar10;
  
  iVar9 = 0;
  if (0 < param_4) {
    while (iVar9 < param_4) {
      bVar1 = *(byte *)(param_2 + iVar9);
      iVar10 = iVar9;
      while (iVar9 = iVar10, param_3 != bVar1) {
        iVar10 = iVar10 + 1;
        if (param_4 == iVar10) {
          return;
        }
        bVar1 = *(byte *)(param_2 + iVar10);
      }
      do {
        iVar6 = iVar9;
        iVar9 = iVar6 + 1;
        if (param_4 <= iVar9) break;
      } while ((int)param_3 <= (int)(uint)*(byte *)(param_2 + 1 + iVar6));
      if (iVar10 < iVar6) {
        puVar5 = (undefined4 *)(param_1 + iVar10 * 0xc);
        iVar7 = iVar6;
        puVar8 = (undefined4 *)(param_1 + iVar6 * 0xc);
        do {
          uVar3 = *puVar8;
          iVar7 = iVar7 + -1;
          uVar2 = *(undefined2 *)(puVar8 + 2);
          uVar4 = puVar8[1];
          *puVar8 = *puVar5;
          puVar8[1] = puVar5[1];
          puVar8[2] = puVar5[2];
          *(undefined2 *)(puVar5 + 2) = uVar2;
          *puVar5 = uVar3;
          puVar5[1] = uVar4;
          puVar5 = puVar5 + 3;
          puVar8 = puVar8 + -3;
        } while ((iVar10 + iVar6) - iVar7 < iVar7);
        iVar10 = iVar10 + 1 + ((uint)((iVar6 + -1) - iVar10) >> 1);
      }
      if (iVar10 <= iVar9) {
        iVar10 = iVar9;
      }
      if (param_4 <= iVar10) {
        return;
      }
    }
  }
  return;
}

