
/* WARNING: Unknown calling convention */

size_t critical_factorization(uchar *needle,size_t needle_len,size_t *period)

{
  byte bVar1;
  ulong uVar2;
  byte bVar3;
  ulong uVar4;
  size_t sVar5;
  ulong uVar6;
  ulong uVar7;
  size_t sVar8;
  
  if (2 < needle_len) {
    sVar8 = 1;
    sVar5 = 1;
    uVar6 = 0;
    uVar2 = 0xffffffffffffffff;
    uVar4 = 1;
    do {
      bVar3 = needle[uVar4];
      bVar1 = bVar3 + 0x20;
      if (0x19 < bVar3 - 0x41) {
        bVar1 = bVar3;
      }
      bVar3 = needle[uVar2 + sVar5];
      if (bVar3 - 0x41 < 0x1a) {
        bVar3 = bVar3 + 0x20;
      }
      if (bVar1 < bVar3) {
        sVar8 = uVar4 - uVar2;
        sVar5 = 1;
        uVar6 = uVar4;
      }
      else if (bVar1 == bVar3) {
        if (sVar5 == sVar8) {
          uVar6 = uVar6 + sVar8;
          sVar5 = 1;
        }
        else {
          sVar5 = sVar5 + 1;
        }
      }
      else {
        sVar8 = 1;
        sVar5 = 1;
        uVar2 = uVar6;
        uVar6 = uVar6 + 1;
      }
      uVar4 = uVar6 + sVar5;
    } while (uVar4 < needle_len);
    *period = sVar8;
    sVar5 = 1;
    sVar8 = 1;
    uVar7 = 0;
    uVar6 = 0xffffffffffffffff;
    uVar4 = 1;
    do {
      bVar3 = needle[uVar4];
      bVar1 = bVar3 + 0x20;
      if (0x19 < bVar3 - 0x41) {
        bVar1 = bVar3;
      }
      bVar3 = needle[uVar6 + sVar8];
      if (bVar3 - 0x41 < 0x1a) {
        bVar3 = bVar3 + 0x20;
      }
      if (bVar3 < bVar1) {
        sVar5 = uVar4 - uVar6;
        sVar8 = 1;
        uVar7 = uVar4;
      }
      else if (bVar1 == bVar3) {
        if (sVar8 == sVar5) {
          uVar7 = uVar7 + sVar5;
          sVar8 = 1;
        }
        else {
          sVar8 = sVar8 + 1;
        }
      }
      else {
        sVar5 = 1;
        sVar8 = 1;
        uVar6 = uVar7;
        uVar7 = uVar7 + 1;
      }
      uVar4 = sVar8 + uVar7;
    } while (uVar4 < needle_len);
    uVar4 = uVar2 + 1;
    if (uVar2 + 1 <= uVar6 + 1) {
      *period = sVar5;
      uVar4 = uVar6 + 1;
    }
    return uVar4;
  }
  *period = 1;
  return needle_len - 1;
}



ulong FUN_00141c58(long param_1,ulong param_2,long *param_3)

{
  byte bVar1;
  ulong uVar2;
  byte bVar3;
  ulong uVar4;
  long lVar5;
  ulong uVar6;
  ulong uVar7;
  long lVar8;
  
  if (2 < param_2) {
    lVar8 = 1;
    lVar5 = 1;
    uVar6 = 0;
    uVar2 = 0xffffffffffffffff;
    uVar4 = 1;
    do {
      bVar3 = *(byte *)(param_1 + uVar4);
      bVar1 = bVar3 + 0x20;
      if (0x19 < bVar3 - 0x41) {
        bVar1 = bVar3;
      }
      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);
      if (bVar3 - 0x41 < 0x1a) {
        bVar3 = bVar3 + 0x20;
      }
      if (bVar1 < bVar3) {
        lVar8 = uVar4 - uVar2;
        lVar5 = 1;
        uVar6 = uVar4;
      }
      else if (bVar1 == bVar3) {
        if (lVar5 == lVar8) {
          uVar6 = uVar6 + lVar8;
          lVar5 = 1;
        }
        else {
          lVar5 = lVar5 + 1;
        }
      }
      else {
        lVar8 = 1;
        lVar5 = 1;
        uVar2 = uVar6;
        uVar6 = uVar6 + 1;
      }
      uVar4 = uVar6 + lVar5;
    } while (uVar4 < param_2);
    *param_3 = lVar8;
    lVar5 = 1;
    lVar8 = 1;
    uVar7 = 0;
    uVar6 = 0xffffffffffffffff;
    uVar4 = 1;
    do {
      bVar3 = *(byte *)(param_1 + uVar4);
      bVar1 = bVar3 + 0x20;
      if (0x19 < bVar3 - 0x41) {
        bVar1 = bVar3;
      }
      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);
      if (bVar3 - 0x41 < 0x1a) {
        bVar3 = bVar3 + 0x20;
      }
      if (bVar3 < bVar1) {
        lVar5 = uVar4 - uVar6;
        lVar8 = 1;
        uVar7 = uVar4;
      }
      else if (bVar1 == bVar3) {
        if (lVar8 == lVar5) {
          uVar7 = uVar7 + lVar5;
          lVar8 = 1;
        }
        else {
          lVar8 = lVar8 + 1;
        }
      }
      else {
        lVar5 = 1;
        lVar8 = 1;
        uVar6 = uVar7;
        uVar7 = uVar7 + 1;
      }
      uVar4 = lVar8 + uVar7;
    } while (uVar4 < param_2);
    uVar4 = uVar2 + 1;
    if (uVar2 + 1 <= uVar6 + 1) {
      *param_3 = lVar5;
      uVar4 = uVar6 + 1;
    }
    return uVar4;
  }
  *param_3 = 1;
  return param_2 - 1;
}


CMP RSI,0x2
JBE 0x00141c8d
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R12D,0x1
MOV R10D,0x1
MOV R11D,0x0
MOV RAX,-0x1
MOV R9D,0x1
MOV R13D,0x1
JMP 0x00141cb4
MOV qword ptr [RDX],0x1
LEA RAX,[RSI + -0x1]
RET
JZ 0x00141cf1
MOV RAX,R11
LEA R11,[R11 + 0x1]
MOV R12,R13
MOV R10D,0x1
LEA R9,[R11 + R10*0x1]
CMP R9,RSI
JNC 0x00141d07
MOVZX ECX,byte ptr [RDI + R9*0x1]
LEA EBX,[RCX + -0x41]
LEA R8D,[RCX + 0x20]
CMP EBX,0x1a
CMOVNC R8D,ECX
LEA RCX,[RDI + R10*0x1]
MOVZX ECX,byte ptr [RCX + RAX*0x1]
LEA EBP,[RCX + -0x41]
LEA EBX,[RCX + 0x20]
CMP EBP,0x1a
CMOVC ECX,EBX
CMP R8B,CL
JNC 0x00141c99
MOV R12,R9
SUB R12,RAX
MOV R11,R9
MOV R10D,0x1
JMP 0x00141cab
CMP R10,R12
JZ 0x00141cfc
ADD R10,0x1
JMP 0x00141cab
ADD R11,R12
MOV R10D,0x1
JMP 0x00141cab
MOV qword ptr [RDX],R12
MOV EBP,0x1
MOV R10D,0x1
MOV R11D,0x0
MOV RBX,-0x1
MOV R9D,0x1
MOV R13D,0x1
JMP 0x00141d4b
JZ 0x00141d8e
MOV RBX,R11
LEA R11,[R11 + 0x1]
MOV RBP,R13
MOV R10D,0x1
LEA R9,[R10 + R11*0x1]
CMP R9,RSI
JNC 0x00141da4
MOVZX ECX,byte ptr [RDI + R9*0x1]
LEA R12D,[RCX + -0x41]
LEA R8D,[RCX + 0x20]
CMP R12D,0x1a
CMOVNC R8D,ECX
LEA RCX,[RDI + R10*0x1]
MOVZX ECX,byte ptr [RCX + RBX*0x1]
LEA R14D,[RCX + -0x41]
LEA R12D,[RCX + 0x20]
CMP R14D,0x1a
CMOVC ECX,R12D
CMP R8B,CL
JBE 0x00141d30
MOV RBP,R9
SUB RBP,RBX
MOV R11,R9
MOV R10D,0x1
JMP 0x00141d42
CMP R10,RBP
JZ 0x00141d99
ADD R10,0x1
JMP 0x00141d42
ADD R11,RBP
MOV R10D,0x1
JMP 0x00141d42
ADD RBX,0x1
ADD RAX,0x1
CMP RBX,RAX
JC 0x00141db7
MOV qword ptr [RDX],RBP
MOV RAX,RBX
POP RBX
POP RBP
POP R12
POP R13
POP R14
RET
(translation_unit "ulong FUN_00141c58(long param_1,ulong param_2,long *param_3)\n\n{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  long lVar5;\n  ulong uVar6;\n  ulong uVar7;\n  long lVar8;\n  \n  if (2 < param_2) {\n    lVar8 = 1;\n    lVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    } while (uVar4 < param_2);\n    *param_3 = lVar8;\n    lVar5 = 1;\n    lVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    } while (uVar4 < param_2);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }\n  *param_3 = 1;\n  return param_2 - 1;\n}\n\n" (function_definition "ulong FUN_00141c58(long param_1,ulong param_2,long *param_3)\n\n{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  long lVar5;\n  ulong uVar6;\n  ulong uVar7;\n  long lVar8;\n  \n  if (2 < param_2) {\n    lVar8 = 1;\n    lVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    } while (uVar4 < param_2);\n    *param_3 = lVar8;\n    lVar5 = 1;\n    lVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    } while (uVar4 < param_2);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }\n  *param_3 = 1;\n  return param_2 - 1;\n}" type_identifier (function_declarator "FUN_00141c58(long param_1,ulong param_2,long *param_3)" identifier (parameter_list "(long param_1,ulong param_2,long *param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "long *param_3" (sized_type_specifier "long" long) (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  long lVar5;\n  ulong uVar6;\n  ulong uVar7;\n  long lVar8;\n  \n  if (2 < param_2) {\n    lVar8 = 1;\n    lVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    } while (uVar4 < param_2);\n    *param_3 = lVar8;\n    lVar5 = 1;\n    lVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    } while (uVar4 < param_2);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }\n  *param_3 = 1;\n  return param_2 - 1;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "byte bVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar6;" type_identifier identifier ;) (declaration "ulong uVar7;" type_identifier identifier ;) (declaration "long lVar8;" (sized_type_specifier "long" long) identifier ;) (if_statement "if (2 < param_2) {\n    lVar8 = 1;\n    lVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    } while (uVar4 < param_2);\n    *param_3 = lVar8;\n    lVar5 = 1;\n    lVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    } while (uVar4 < param_2);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }" if (parenthesized_expression "(2 < param_2)" ( (binary_expression "2 < param_2" number_literal < identifier) )) (compound_statement "{\n    lVar8 = 1;\n    lVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    } while (uVar4 < param_2);\n    *param_3 = lVar8;\n    lVar5 = 1;\n    lVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    } while (uVar4 < param_2);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }" { (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" identifier = number_literal) ;) (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" identifier = number_literal) ;) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (expression_statement "uVar2 = 0xffffffffffffffff;" (assignment_expression "uVar2 = 0xffffffffffffffff" identifier = number_literal) ;) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) (do_statement "do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    } while (uVar4 < param_2);" do (compound_statement "{\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    }" { (expression_statement "bVar3 = *(byte *)(param_1 + uVar4);" (assignment_expression "bVar3 = *(byte *)(param_1 + uVar4)" identifier = (pointer_expression "*(byte *)(param_1 + uVar4)" * (cast_expression "(byte *)(param_1 + uVar4)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar4)" ( (binary_expression "param_1 + uVar4" identifier + identifier) ))))) ;) (expression_statement "bVar1 = bVar3 + 0x20;" (assignment_expression "bVar1 = bVar3 + 0x20" identifier = (binary_expression "bVar3 + 0x20" identifier + number_literal)) ;) (if_statement "if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }" if (parenthesized_expression "(0x19 < bVar3 - 0x41)" ( (binary_expression "0x19 < bVar3 - 0x41" number_literal < (binary_expression "bVar3 - 0x41" identifier - number_literal)) )) (compound_statement "{\n        bVar1 = bVar3;\n      }" { (expression_statement "bVar1 = bVar3;" (assignment_expression "bVar1 = bVar3" identifier = identifier) ;) })) (expression_statement "bVar3 = *(byte *)(param_1 + lVar5 + uVar2);" (assignment_expression "bVar3 = *(byte *)(param_1 + lVar5 + uVar2)" identifier = (pointer_expression "*(byte *)(param_1 + lVar5 + uVar2)" * (cast_expression "(byte *)(param_1 + lVar5 + uVar2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar5 + uVar2)" ( (binary_expression "param_1 + lVar5 + uVar2" (binary_expression "param_1 + lVar5" identifier + identifier) + identifier) ))))) ;) (if_statement "if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }" if (parenthesized_expression "(bVar3 - 0x41 < 0x1a)" ( (binary_expression "bVar3 - 0x41 < 0x1a" (binary_expression "bVar3 - 0x41" identifier - number_literal) < number_literal) )) (compound_statement "{\n        bVar3 = bVar3 + 0x20;\n      }" { (expression_statement "bVar3 = bVar3 + 0x20;" (assignment_expression "bVar3 = bVar3 + 0x20" identifier = (binary_expression "bVar3 + 0x20" identifier + number_literal)) ;) })) (if_statement "if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" if (parenthesized_expression "(bVar1 < bVar3)" ( (binary_expression "bVar1 < bVar3" identifier < identifier) )) (compound_statement "{\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }" { (expression_statement "lVar8 = uVar4 - uVar2;" (assignment_expression "lVar8 = uVar4 - uVar2" identifier = (binary_expression "uVar4 - uVar2" identifier - identifier)) ;) (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" identifier = number_literal) ;) (expression_statement "uVar6 = uVar4;" (assignment_expression "uVar6 = uVar4" identifier = identifier) ;) }) (else_clause "else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" else (if_statement "if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" if (parenthesized_expression "(bVar1 == bVar3)" ( (binary_expression "bVar1 == bVar3" identifier == identifier) )) (compound_statement "{\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }" { (if_statement "if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }" if (parenthesized_expression "(lVar5 == lVar8)" ( (binary_expression "lVar5 == lVar8" identifier == identifier) )) (compound_statement "{\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }" { (expression_statement "uVar6 = uVar6 + lVar8;" (assignment_expression "uVar6 = uVar6 + lVar8" identifier = (binary_expression "uVar6 + lVar8" identifier + identifier)) ;) (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" identifier = number_literal) ;) }) (else_clause "else {\n          lVar5 = lVar5 + 1;\n        }" else (compound_statement "{\n          lVar5 = lVar5 + 1;\n        }" { (expression_statement "lVar5 = lVar5 + 1;" (assignment_expression "lVar5 = lVar5 + 1" identifier = (binary_expression "lVar5 + 1" identifier + number_literal)) ;) }))) }) (else_clause "else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" else (compound_statement "{\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" { (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" identifier = number_literal) ;) (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" identifier = number_literal) ;) (expression_statement "uVar2 = uVar6;" (assignment_expression "uVar2 = uVar6" identifier = identifier) ;) (expression_statement "uVar6 = uVar6 + 1;" (assignment_expression "uVar6 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) }))))) (expression_statement "uVar4 = uVar6 + lVar5;" (assignment_expression "uVar4 = uVar6 + lVar5" identifier = (binary_expression "uVar6 + lVar5" identifier + identifier)) ;) }) while (parenthesized_expression "(uVar4 < param_2)" ( (binary_expression "uVar4 < param_2" identifier < identifier) )) ;) (expression_statement "*param_3 = lVar8;" (assignment_expression "*param_3 = lVar8" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" identifier = number_literal) ;) (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" identifier = number_literal) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (expression_statement "uVar6 = 0xffffffffffffffff;" (assignment_expression "uVar6 = 0xffffffffffffffff" identifier = number_literal) ;) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) (do_statement "do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    } while (uVar4 < param_2);" do (compound_statement "{\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    }" { (expression_statement "bVar3 = *(byte *)(param_1 + uVar4);" (assignment_expression "bVar3 = *(byte *)(param_1 + uVar4)" identifier = (pointer_expression "*(byte *)(param_1 + uVar4)" * (cast_expression "(byte *)(param_1 + uVar4)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar4)" ( (binary_expression "param_1 + uVar4" identifier + identifier) ))))) ;) (expression_statement "bVar1 = bVar3 + 0x20;" (assignment_expression "bVar1 = bVar3 + 0x20" identifier = (binary_expression "bVar3 + 0x20" identifier + number_literal)) ;) (if_statement "if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }" if (parenthesized_expression "(0x19 < bVar3 - 0x41)" ( (binary_expression "0x19 < bVar3 - 0x41" number_literal < (binary_expression "bVar3 - 0x41" identifier - number_literal)) )) (compound_statement "{\n        bVar1 = bVar3;\n      }" { (expression_statement "bVar1 = bVar3;" (assignment_expression "bVar1 = bVar3" identifier = identifier) ;) })) (expression_statement "bVar3 = *(byte *)(param_1 + lVar8 + uVar6);" (assignment_expression "bVar3 = *(byte *)(param_1 + lVar8 + uVar6)" identifier = (pointer_expression "*(byte *)(param_1 + lVar8 + uVar6)" * (cast_expression "(byte *)(param_1 + lVar8 + uVar6)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar8 + uVar6)" ( (binary_expression "param_1 + lVar8 + uVar6" (binary_expression "param_1 + lVar8" identifier + identifier) + identifier) ))))) ;) (if_statement "if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }" if (parenthesized_expression "(bVar3 - 0x41 < 0x1a)" ( (binary_expression "bVar3 - 0x41 < 0x1a" (binary_expression "bVar3 - 0x41" identifier - number_literal) < number_literal) )) (compound_statement "{\n        bVar3 = bVar3 + 0x20;\n      }" { (expression_statement "bVar3 = bVar3 + 0x20;" (assignment_expression "bVar3 = bVar3 + 0x20" identifier = (binary_expression "bVar3 + 0x20" identifier + number_literal)) ;) })) (if_statement "if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" if (parenthesized_expression "(bVar3 < bVar1)" ( (binary_expression "bVar3 < bVar1" identifier < identifier) )) (compound_statement "{\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }" { (expression_statement "lVar5 = uVar4 - uVar6;" (assignment_expression "lVar5 = uVar4 - uVar6" identifier = (binary_expression "uVar4 - uVar6" identifier - identifier)) ;) (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" identifier = number_literal) ;) (expression_statement "uVar7 = uVar4;" (assignment_expression "uVar7 = uVar4" identifier = identifier) ;) }) (else_clause "else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" else (if_statement "if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" if (parenthesized_expression "(bVar1 == bVar3)" ( (binary_expression "bVar1 == bVar3" identifier == identifier) )) (compound_statement "{\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }" { (if_statement "if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }" if (parenthesized_expression "(lVar8 == lVar5)" ( (binary_expression "lVar8 == lVar5" identifier == identifier) )) (compound_statement "{\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }" { (expression_statement "uVar7 = uVar7 + lVar5;" (assignment_expression "uVar7 = uVar7 + lVar5" identifier = (binary_expression "uVar7 + lVar5" identifier + identifier)) ;) (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" identifier = number_literal) ;) }) (else_clause "else {\n          lVar8 = lVar8 + 1;\n        }" else (compound_statement "{\n          lVar8 = lVar8 + 1;\n        }" { (expression_statement "lVar8 = lVar8 + 1;" (assignment_expression "lVar8 = lVar8 + 1" identifier = (binary_expression "lVar8 + 1" identifier + number_literal)) ;) }))) }) (else_clause "else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" else (compound_statement "{\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" { (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" identifier = number_literal) ;) (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" identifier = number_literal) ;) (expression_statement "uVar6 = uVar7;" (assignment_expression "uVar6 = uVar7" identifier = identifier) ;) (expression_statement "uVar7 = uVar7 + 1;" (assignment_expression "uVar7 = uVar7 + 1" identifier = (binary_expression "uVar7 + 1" identifier + number_literal)) ;) }))))) (expression_statement "uVar4 = lVar8 + uVar7;" (assignment_expression "uVar4 = lVar8 + uVar7" identifier = (binary_expression "lVar8 + uVar7" identifier + identifier)) ;) }) while (parenthesized_expression "(uVar4 < param_2)" ( (binary_expression "uVar4 < param_2" identifier < identifier) )) ;) (expression_statement "uVar4 = uVar2 + 1;" (assignment_expression "uVar4 = uVar2 + 1" identifier = (binary_expression "uVar2 + 1" identifier + number_literal)) ;) (if_statement "if (uVar2 + 1 <= uVar6 + 1) {\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }" if (parenthesized_expression "(uVar2 + 1 <= uVar6 + 1)" ( (binary_expression "uVar2 + 1 <= uVar6 + 1" (binary_expression "uVar2 + 1" identifier + number_literal) <= (binary_expression "uVar6 + 1" identifier + number_literal)) )) (compound_statement "{\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }" { (expression_statement "*param_3 = lVar5;" (assignment_expression "*param_3 = lVar5" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "uVar4 = uVar6 + 1;" (assignment_expression "uVar4 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) })) (return_statement "return uVar4;" return identifier ;) })) (expression_statement "*param_3 = 1;" (assignment_expression "*param_3 = 1" (pointer_expression "*param_3" * identifier) = number_literal) ;) (return_statement "return param_2 - 1;" return (binary_expression "param_2 - 1" identifier - number_literal) ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nsize_t critical_factorization(uchar *needle,size_t needle_len,size_t *period)\n\n{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  size_t sVar5;\n  ulong uVar6;\n  ulong uVar7;\n  size_t sVar8;\n  \n  if (2 < needle_len) {\n    sVar8 = 1;\n    sVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = needle[uVar4];\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = needle[uVar2 + sVar5];\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        sVar8 = uVar4 - uVar2;\n        sVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (sVar5 == sVar8) {\n          uVar6 = uVar6 + sVar8;\n          sVar5 = 1;\n        }\n        else {\n          sVar5 = sVar5 + 1;\n        }\n      }\n      else {\n        sVar8 = 1;\n        sVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + sVar5;\n    } while (uVar4 < needle_len);\n    *period = sVar8;\n    sVar5 = 1;\n    sVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = needle[uVar4];\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = needle[uVar6 + sVar8];\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        sVar5 = uVar4 - uVar6;\n        sVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (sVar8 == sVar5) {\n          uVar7 = uVar7 + sVar5;\n          sVar8 = 1;\n        }\n        else {\n          sVar8 = sVar8 + 1;\n        }\n      }\n      else {\n        sVar5 = 1;\n        sVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = sVar8 + uVar7;\n    } while (uVar4 < needle_len);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *period = sVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }\n  *period = 1;\n  return needle_len - 1;\n}\n\n" comment (function_definition "size_t critical_factorization(uchar *needle,size_t needle_len,size_t *period)\n\n{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  size_t sVar5;\n  ulong uVar6;\n  ulong uVar7;\n  size_t sVar8;\n  \n  if (2 < needle_len) {\n    sVar8 = 1;\n    sVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = needle[uVar4];\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = needle[uVar2 + sVar5];\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        sVar8 = uVar4 - uVar2;\n        sVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (sVar5 == sVar8) {\n          uVar6 = uVar6 + sVar8;\n          sVar5 = 1;\n        }\n        else {\n          sVar5 = sVar5 + 1;\n        }\n      }\n      else {\n        sVar8 = 1;\n        sVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + sVar5;\n    } while (uVar4 < needle_len);\n    *period = sVar8;\n    sVar5 = 1;\n    sVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = needle[uVar4];\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = needle[uVar6 + sVar8];\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        sVar5 = uVar4 - uVar6;\n        sVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (sVar8 == sVar5) {\n          uVar7 = uVar7 + sVar5;\n          sVar8 = 1;\n        }\n        else {\n          sVar8 = sVar8 + 1;\n        }\n      }\n      else {\n        sVar5 = 1;\n        sVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = sVar8 + uVar7;\n    } while (uVar4 < needle_len);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *period = sVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }\n  *period = 1;\n  return needle_len - 1;\n}" primitive_type (function_declarator "critical_factorization(uchar *needle,size_t needle_len,size_t *period)" identifier (parameter_list "(uchar *needle,size_t needle_len,size_t *period)" ( (parameter_declaration "uchar *needle" type_identifier (pointer_declarator "*needle" * identifier)) , (parameter_declaration "size_t needle_len" primitive_type identifier) , (parameter_declaration "size_t *period" primitive_type (pointer_declarator "*period" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  size_t sVar5;\n  ulong uVar6;\n  ulong uVar7;\n  size_t sVar8;\n  \n  if (2 < needle_len) {\n    sVar8 = 1;\n    sVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = needle[uVar4];\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = needle[uVar2 + sVar5];\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        sVar8 = uVar4 - uVar2;\n        sVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (sVar5 == sVar8) {\n          uVar6 = uVar6 + sVar8;\n          sVar5 = 1;\n        }\n        else {\n          sVar5 = sVar5 + 1;\n        }\n      }\n      else {\n        sVar8 = 1;\n        sVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + sVar5;\n    } while (uVar4 < needle_len);\n    *period = sVar8;\n    sVar5 = 1;\n    sVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = needle[uVar4];\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = needle[uVar6 + sVar8];\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        sVar5 = uVar4 - uVar6;\n        sVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (sVar8 == sVar5) {\n          uVar7 = uVar7 + sVar5;\n          sVar8 = 1;\n        }\n        else {\n          sVar8 = sVar8 + 1;\n        }\n      }\n      else {\n        sVar5 = 1;\n        sVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = sVar8 + uVar7;\n    } while (uVar4 < needle_len);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *period = sVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }\n  *period = 1;\n  return needle_len - 1;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "byte bVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "ulong uVar6;" type_identifier identifier ;) (declaration "ulong uVar7;" type_identifier identifier ;) (declaration "size_t sVar8;" primitive_type identifier ;) (if_statement "if (2 < needle_len) {\n    sVar8 = 1;\n    sVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = needle[uVar4];\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = needle[uVar2 + sVar5];\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        sVar8 = uVar4 - uVar2;\n        sVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (sVar5 == sVar8) {\n          uVar6 = uVar6 + sVar8;\n          sVar5 = 1;\n        }\n        else {\n          sVar5 = sVar5 + 1;\n        }\n      }\n      else {\n        sVar8 = 1;\n        sVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + sVar5;\n    } while (uVar4 < needle_len);\n    *period = sVar8;\n    sVar5 = 1;\n    sVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = needle[uVar4];\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = needle[uVar6 + sVar8];\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        sVar5 = uVar4 - uVar6;\n        sVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (sVar8 == sVar5) {\n          uVar7 = uVar7 + sVar5;\n          sVar8 = 1;\n        }\n        else {\n          sVar8 = sVar8 + 1;\n        }\n      }\n      else {\n        sVar5 = 1;\n        sVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = sVar8 + uVar7;\n    } while (uVar4 < needle_len);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *period = sVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }" if (parenthesized_expression "(2 < needle_len)" ( (binary_expression "2 < needle_len" number_literal < identifier) )) (compound_statement "{\n    sVar8 = 1;\n    sVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = needle[uVar4];\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = needle[uVar2 + sVar5];\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        sVar8 = uVar4 - uVar2;\n        sVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (sVar5 == sVar8) {\n          uVar6 = uVar6 + sVar8;\n          sVar5 = 1;\n        }\n        else {\n          sVar5 = sVar5 + 1;\n        }\n      }\n      else {\n        sVar8 = 1;\n        sVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + sVar5;\n    } while (uVar4 < needle_len);\n    *period = sVar8;\n    sVar5 = 1;\n    sVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = needle[uVar4];\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = needle[uVar6 + sVar8];\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        sVar5 = uVar4 - uVar6;\n        sVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (sVar8 == sVar5) {\n          uVar7 = uVar7 + sVar5;\n          sVar8 = 1;\n        }\n        else {\n          sVar8 = sVar8 + 1;\n        }\n      }\n      else {\n        sVar5 = 1;\n        sVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = sVar8 + uVar7;\n    } while (uVar4 < needle_len);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *period = sVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }" { (expression_statement "sVar8 = 1;" (assignment_expression "sVar8 = 1" identifier = number_literal) ;) (expression_statement "sVar5 = 1;" (assignment_expression "sVar5 = 1" identifier = number_literal) ;) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (expression_statement "uVar2 = 0xffffffffffffffff;" (assignment_expression "uVar2 = 0xffffffffffffffff" identifier = number_literal) ;) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) (do_statement "do {\n      bVar3 = needle[uVar4];\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = needle[uVar2 + sVar5];\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        sVar8 = uVar4 - uVar2;\n        sVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (sVar5 == sVar8) {\n          uVar6 = uVar6 + sVar8;\n          sVar5 = 1;\n        }\n        else {\n          sVar5 = sVar5 + 1;\n        }\n      }\n      else {\n        sVar8 = 1;\n        sVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + sVar5;\n    } while (uVar4 < needle_len);" do (compound_statement "{\n      bVar3 = needle[uVar4];\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = needle[uVar2 + sVar5];\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        sVar8 = uVar4 - uVar2;\n        sVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (sVar5 == sVar8) {\n          uVar6 = uVar6 + sVar8;\n          sVar5 = 1;\n        }\n        else {\n          sVar5 = sVar5 + 1;\n        }\n      }\n      else {\n        sVar8 = 1;\n        sVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + sVar5;\n    }" { (expression_statement "bVar3 = needle[uVar4];" (assignment_expression "bVar3 = needle[uVar4]" identifier = (subscript_expression "needle[uVar4]" identifier [ identifier ])) ;) (expression_statement "bVar1 = bVar3 + 0x20;" (assignment_expression "bVar1 = bVar3 + 0x20" identifier = (binary_expression "bVar3 + 0x20" identifier + number_literal)) ;) (if_statement "if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }" if (parenthesized_expression "(0x19 < bVar3 - 0x41)" ( (binary_expression "0x19 < bVar3 - 0x41" number_literal < (binary_expression "bVar3 - 0x41" identifier - number_literal)) )) (compound_statement "{\n        bVar1 = bVar3;\n      }" { (expression_statement "bVar1 = bVar3;" (assignment_expression "bVar1 = bVar3" identifier = identifier) ;) })) (expression_statement "bVar3 = needle[uVar2 + sVar5];" (assignment_expression "bVar3 = needle[uVar2 + sVar5]" identifier = (subscript_expression "needle[uVar2 + sVar5]" identifier [ (binary_expression "uVar2 + sVar5" identifier + identifier) ])) ;) (if_statement "if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }" if (parenthesized_expression "(bVar3 - 0x41 < 0x1a)" ( (binary_expression "bVar3 - 0x41 < 0x1a" (binary_expression "bVar3 - 0x41" identifier - number_literal) < number_literal) )) (compound_statement "{\n        bVar3 = bVar3 + 0x20;\n      }" { (expression_statement "bVar3 = bVar3 + 0x20;" (assignment_expression "bVar3 = bVar3 + 0x20" identifier = (binary_expression "bVar3 + 0x20" identifier + number_literal)) ;) })) (if_statement "if (bVar1 < bVar3) {\n        sVar8 = uVar4 - uVar2;\n        sVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (sVar5 == sVar8) {\n          uVar6 = uVar6 + sVar8;\n          sVar5 = 1;\n        }\n        else {\n          sVar5 = sVar5 + 1;\n        }\n      }\n      else {\n        sVar8 = 1;\n        sVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" if (parenthesized_expression "(bVar1 < bVar3)" ( (binary_expression "bVar1 < bVar3" identifier < identifier) )) (compound_statement "{\n        sVar8 = uVar4 - uVar2;\n        sVar5 = 1;\n        uVar6 = uVar4;\n      }" { (expression_statement "sVar8 = uVar4 - uVar2;" (assignment_expression "sVar8 = uVar4 - uVar2" identifier = (binary_expression "uVar4 - uVar2" identifier - identifier)) ;) (expression_statement "sVar5 = 1;" (assignment_expression "sVar5 = 1" identifier = number_literal) ;) (expression_statement "uVar6 = uVar4;" (assignment_expression "uVar6 = uVar4" identifier = identifier) ;) }) (else_clause "else if (bVar1 == bVar3) {\n        if (sVar5 == sVar8) {\n          uVar6 = uVar6 + sVar8;\n          sVar5 = 1;\n        }\n        else {\n          sVar5 = sVar5 + 1;\n        }\n      }\n      else {\n        sVar8 = 1;\n        sVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" else (if_statement "if (bVar1 == bVar3) {\n        if (sVar5 == sVar8) {\n          uVar6 = uVar6 + sVar8;\n          sVar5 = 1;\n        }\n        else {\n          sVar5 = sVar5 + 1;\n        }\n      }\n      else {\n        sVar8 = 1;\n        sVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" if (parenthesized_expression "(bVar1 == bVar3)" ( (binary_expression "bVar1 == bVar3" identifier == identifier) )) (compound_statement "{\n        if (sVar5 == sVar8) {\n          uVar6 = uVar6 + sVar8;\n          sVar5 = 1;\n        }\n        else {\n          sVar5 = sVar5 + 1;\n        }\n      }" { (if_statement "if (sVar5 == sVar8) {\n          uVar6 = uVar6 + sVar8;\n          sVar5 = 1;\n        }\n        else {\n          sVar5 = sVar5 + 1;\n        }" if (parenthesized_expression "(sVar5 == sVar8)" ( (binary_expression "sVar5 == sVar8" identifier == identifier) )) (compound_statement "{\n          uVar6 = uVar6 + sVar8;\n          sVar5 = 1;\n        }" { (expression_statement "uVar6 = uVar6 + sVar8;" (assignment_expression "uVar6 = uVar6 + sVar8" identifier = (binary_expression "uVar6 + sVar8" identifier + identifier)) ;) (expression_statement "sVar5 = 1;" (assignment_expression "sVar5 = 1" identifier = number_literal) ;) }) (else_clause "else {\n          sVar5 = sVar5 + 1;\n        }" else (compound_statement "{\n          sVar5 = sVar5 + 1;\n        }" { (expression_statement "sVar5 = sVar5 + 1;" (assignment_expression "sVar5 = sVar5 + 1" identifier = (binary_expression "sVar5 + 1" identifier + number_literal)) ;) }))) }) (else_clause "else {\n        sVar8 = 1;\n        sVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" else (compound_statement "{\n        sVar8 = 1;\n        sVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" { (expression_statement "sVar8 = 1;" (assignment_expression "sVar8 = 1" identifier = number_literal) ;) (expression_statement "sVar5 = 1;" (assignment_expression "sVar5 = 1" identifier = number_literal) ;) (expression_statement "uVar2 = uVar6;" (assignment_expression "uVar2 = uVar6" identifier = identifier) ;) (expression_statement "uVar6 = uVar6 + 1;" (assignment_expression "uVar6 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) }))))) (expression_statement "uVar4 = uVar6 + sVar5;" (assignment_expression "uVar4 = uVar6 + sVar5" identifier = (binary_expression "uVar6 + sVar5" identifier + identifier)) ;) }) while (parenthesized_expression "(uVar4 < needle_len)" ( (binary_expression "uVar4 < needle_len" identifier < identifier) )) ;) (expression_statement "*period = sVar8;" (assignment_expression "*period = sVar8" (pointer_expression "*period" * identifier) = identifier) ;) (expression_statement "sVar5 = 1;" (assignment_expression "sVar5 = 1" identifier = number_literal) ;) (expression_statement "sVar8 = 1;" (assignment_expression "sVar8 = 1" identifier = number_literal) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (expression_statement "uVar6 = 0xffffffffffffffff;" (assignment_expression "uVar6 = 0xffffffffffffffff" identifier = number_literal) ;) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) (do_statement "do {\n      bVar3 = needle[uVar4];\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = needle[uVar6 + sVar8];\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        sVar5 = uVar4 - uVar6;\n        sVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (sVar8 == sVar5) {\n          uVar7 = uVar7 + sVar5;\n          sVar8 = 1;\n        }\n        else {\n          sVar8 = sVar8 + 1;\n        }\n      }\n      else {\n        sVar5 = 1;\n        sVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = sVar8 + uVar7;\n    } while (uVar4 < needle_len);" do (compound_statement "{\n      bVar3 = needle[uVar4];\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = needle[uVar6 + sVar8];\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        sVar5 = uVar4 - uVar6;\n        sVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (sVar8 == sVar5) {\n          uVar7 = uVar7 + sVar5;\n          sVar8 = 1;\n        }\n        else {\n          sVar8 = sVar8 + 1;\n        }\n      }\n      else {\n        sVar5 = 1;\n        sVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = sVar8 + uVar7;\n    }" { (expression_statement "bVar3 = needle[uVar4];" (assignment_expression "bVar3 = needle[uVar4]" identifier = (subscript_expression "needle[uVar4]" identifier [ identifier ])) ;) (expression_statement "bVar1 = bVar3 + 0x20;" (assignment_expression "bVar1 = bVar3 + 0x20" identifier = (binary_expression "bVar3 + 0x20" identifier + number_literal)) ;) (if_statement "if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }" if (parenthesized_expression "(0x19 < bVar3 - 0x41)" ( (binary_expression "0x19 < bVar3 - 0x41" number_literal < (binary_expression "bVar3 - 0x41" identifier - number_literal)) )) (compound_statement "{\n        bVar1 = bVar3;\n      }" { (expression_statement "bVar1 = bVar3;" (assignment_expression "bVar1 = bVar3" identifier = identifier) ;) })) (expression_statement "bVar3 = needle[uVar6 + sVar8];" (assignment_expression "bVar3 = needle[uVar6 + sVar8]" identifier = (subscript_expression "needle[uVar6 + sVar8]" identifier [ (binary_expression "uVar6 + sVar8" identifier + identifier) ])) ;) (if_statement "if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }" if (parenthesized_expression "(bVar3 - 0x41 < 0x1a)" ( (binary_expression "bVar3 - 0x41 < 0x1a" (binary_expression "bVar3 - 0x41" identifier - number_literal) < number_literal) )) (compound_statement "{\n        bVar3 = bVar3 + 0x20;\n      }" { (expression_statement "bVar3 = bVar3 + 0x20;" (assignment_expression "bVar3 = bVar3 + 0x20" identifier = (binary_expression "bVar3 + 0x20" identifier + number_literal)) ;) })) (if_statement "if (bVar3 < bVar1) {\n        sVar5 = uVar4 - uVar6;\n        sVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (sVar8 == sVar5) {\n          uVar7 = uVar7 + sVar5;\n          sVar8 = 1;\n        }\n        else {\n          sVar8 = sVar8 + 1;\n        }\n      }\n      else {\n        sVar5 = 1;\n        sVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" if (parenthesized_expression "(bVar3 < bVar1)" ( (binary_expression "bVar3 < bVar1" identifier < identifier) )) (compound_statement "{\n        sVar5 = uVar4 - uVar6;\n        sVar8 = 1;\n        uVar7 = uVar4;\n      }" { (expression_statement "sVar5 = uVar4 - uVar6;" (assignment_expression "sVar5 = uVar4 - uVar6" identifier = (binary_expression "uVar4 - uVar6" identifier - identifier)) ;) (expression_statement "sVar8 = 1;" (assignment_expression "sVar8 = 1" identifier = number_literal) ;) (expression_statement "uVar7 = uVar4;" (assignment_expression "uVar7 = uVar4" identifier = identifier) ;) }) (else_clause "else if (bVar1 == bVar3) {\n        if (sVar8 == sVar5) {\n          uVar7 = uVar7 + sVar5;\n          sVar8 = 1;\n        }\n        else {\n          sVar8 = sVar8 + 1;\n        }\n      }\n      else {\n        sVar5 = 1;\n        sVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" else (if_statement "if (bVar1 == bVar3) {\n        if (sVar8 == sVar5) {\n          uVar7 = uVar7 + sVar5;\n          sVar8 = 1;\n        }\n        else {\n          sVar8 = sVar8 + 1;\n        }\n      }\n      else {\n        sVar5 = 1;\n        sVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" if (parenthesized_expression "(bVar1 == bVar3)" ( (binary_expression "bVar1 == bVar3" identifier == identifier) )) (compound_statement "{\n        if (sVar8 == sVar5) {\n          uVar7 = uVar7 + sVar5;\n          sVar8 = 1;\n        }\n        else {\n          sVar8 = sVar8 + 1;\n        }\n      }" { (if_statement "if (sVar8 == sVar5) {\n          uVar7 = uVar7 + sVar5;\n          sVar8 = 1;\n        }\n        else {\n          sVar8 = sVar8 + 1;\n        }" if (parenthesized_expression "(sVar8 == sVar5)" ( (binary_expression "sVar8 == sVar5" identifier == identifier) )) (compound_statement "{\n          uVar7 = uVar7 + sVar5;\n          sVar8 = 1;\n        }" { (expression_statement "uVar7 = uVar7 + sVar5;" (assignment_expression "uVar7 = uVar7 + sVar5" identifier = (binary_expression "uVar7 + sVar5" identifier + identifier)) ;) (expression_statement "sVar8 = 1;" (assignment_expression "sVar8 = 1" identifier = number_literal) ;) }) (else_clause "else {\n          sVar8 = sVar8 + 1;\n        }" else (compound_statement "{\n          sVar8 = sVar8 + 1;\n        }" { (expression_statement "sVar8 = sVar8 + 1;" (assignment_expression "sVar8 = sVar8 + 1" identifier = (binary_expression "sVar8 + 1" identifier + number_literal)) ;) }))) }) (else_clause "else {\n        sVar5 = 1;\n        sVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" else (compound_statement "{\n        sVar5 = 1;\n        sVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" { (expression_statement "sVar5 = 1;" (assignment_expression "sVar5 = 1" identifier = number_literal) ;) (expression_statement "sVar8 = 1;" (assignment_expression "sVar8 = 1" identifier = number_literal) ;) (expression_statement "uVar6 = uVar7;" (assignment_expression "uVar6 = uVar7" identifier = identifier) ;) (expression_statement "uVar7 = uVar7 + 1;" (assignment_expression "uVar7 = uVar7 + 1" identifier = (binary_expression "uVar7 + 1" identifier + number_literal)) ;) }))))) (expression_statement "uVar4 = sVar8 + uVar7;" (assignment_expression "uVar4 = sVar8 + uVar7" identifier = (binary_expression "sVar8 + uVar7" identifier + identifier)) ;) }) while (parenthesized_expression "(uVar4 < needle_len)" ( (binary_expression "uVar4 < needle_len" identifier < identifier) )) ;) (expression_statement "uVar4 = uVar2 + 1;" (assignment_expression "uVar4 = uVar2 + 1" identifier = (binary_expression "uVar2 + 1" identifier + number_literal)) ;) (if_statement "if (uVar2 + 1 <= uVar6 + 1) {\n      *period = sVar5;\n      uVar4 = uVar6 + 1;\n    }" if (parenthesized_expression "(uVar2 + 1 <= uVar6 + 1)" ( (binary_expression "uVar2 + 1 <= uVar6 + 1" (binary_expression "uVar2 + 1" identifier + number_literal) <= (binary_expression "uVar6 + 1" identifier + number_literal)) )) (compound_statement "{\n      *period = sVar5;\n      uVar4 = uVar6 + 1;\n    }" { (expression_statement "*period = sVar5;" (assignment_expression "*period = sVar5" (pointer_expression "*period" * identifier) = identifier) ;) (expression_statement "uVar4 = uVar6 + 1;" (assignment_expression "uVar4 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) })) (return_statement "return uVar4;" return identifier ;) })) (expression_statement "*period = 1;" (assignment_expression "*period = 1" (pointer_expression "*period" * identifier) = number_literal) ;) (return_statement "return needle_len - 1;" return (binary_expression "needle_len - 1" identifier - number_literal) ;) })))
(translation_unit "ulong FUN_00141c58(long param_1,ulong param_2,long *param_3)\n\n{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  long lVar5;\n  ulong uVar6;\n  ulong uVar7;\n  long lVar8;\n  \n  if (2 < param_2) {\n    lVar8 = 1;\n    lVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    } while (uVar4 < param_2);\n    *param_3 = lVar8;\n    lVar5 = 1;\n    lVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    } while (uVar4 < param_2);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }\n  *param_3 = 1;\n  return param_2 - 1;\n}\n\n" (function_definition "ulong FUN_00141c58(long param_1,ulong param_2,long *param_3)\n\n{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  long lVar5;\n  ulong uVar6;\n  ulong uVar7;\n  long lVar8;\n  \n  if (2 < param_2) {\n    lVar8 = 1;\n    lVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    } while (uVar4 < param_2);\n    *param_3 = lVar8;\n    lVar5 = 1;\n    lVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    } while (uVar4 < param_2);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }\n  *param_3 = 1;\n  return param_2 - 1;\n}" type_identifier (function_declarator "FUN_00141c58(long param_1,ulong param_2,long *param_3)" identifier (parameter_list "(long param_1,ulong param_2,long *param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "long *param_3" (sized_type_specifier "long" long) (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  long lVar5;\n  ulong uVar6;\n  ulong uVar7;\n  long lVar8;\n  \n  if (2 < param_2) {\n    lVar8 = 1;\n    lVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    } while (uVar4 < param_2);\n    *param_3 = lVar8;\n    lVar5 = 1;\n    lVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    } while (uVar4 < param_2);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }\n  *param_3 = 1;\n  return param_2 - 1;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "byte bVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar6;" type_identifier identifier ;) (declaration "ulong uVar7;" type_identifier identifier ;) (declaration "long lVar8;" (sized_type_specifier "long" long) identifier ;) (if_statement "if (2 < param_2) {\n    lVar8 = 1;\n    lVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    } while (uVar4 < param_2);\n    *param_3 = lVar8;\n    lVar5 = 1;\n    lVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    } while (uVar4 < param_2);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }" if (parenthesized_expression "(2 < param_2)" ( (binary_expression "2 < param_2" number_literal < identifier) )) (compound_statement "{\n    lVar8 = 1;\n    lVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    } while (uVar4 < param_2);\n    *param_3 = lVar8;\n    lVar5 = 1;\n    lVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    } while (uVar4 < param_2);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }" { (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" identifier = number_literal) ;) (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" identifier = number_literal) ;) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (expression_statement "uVar2 = 0xffffffffffffffff;" (assignment_expression "uVar2 = 0xffffffffffffffff" identifier = number_literal) ;) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) (do_statement "do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    } while (uVar4 < param_2);" do (compound_statement "{\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    }" { (expression_statement "bVar3 = *(byte *)(param_1 + uVar4);" (assignment_expression "bVar3 = *(byte *)(param_1 + uVar4)" identifier = (pointer_expression "*(byte *)(param_1 + uVar4)" * (cast_expression "(byte *)(param_1 + uVar4)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar4)" ( (binary_expression "param_1 + uVar4" identifier + identifier) ))))) ;) (expression_statement "bVar1 = bVar3 + 0x20;" (assignment_expression "bVar1 = bVar3 + 0x20" identifier = (binary_expression "bVar3 + 0x20" identifier + number_literal)) ;) (if_statement "if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }" if (parenthesized_expression "(0x19 < bVar3 - 0x41)" ( (binary_expression "0x19 < bVar3 - 0x41" number_literal < (binary_expression "bVar3 - 0x41" identifier - number_literal)) )) (compound_statement "{\n        bVar1 = bVar3;\n      }" { (expression_statement "bVar1 = bVar3;" (assignment_expression "bVar1 = bVar3" identifier = identifier) ;) })) (expression_statement "bVar3 = *(byte *)(param_1 + lVar5 + uVar2);" (assignment_expression "bVar3 = *(byte *)(param_1 + lVar5 + uVar2)" identifier = (pointer_expression "*(byte *)(param_1 + lVar5 + uVar2)" * (cast_expression "(byte *)(param_1 + lVar5 + uVar2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar5 + uVar2)" ( (binary_expression "param_1 + lVar5 + uVar2" (binary_expression "param_1 + lVar5" identifier + identifier) + identifier) ))))) ;) (if_statement "if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }" if (parenthesized_expression "(bVar3 - 0x41 < 0x1a)" ( (binary_expression "bVar3 - 0x41 < 0x1a" (binary_expression "bVar3 - 0x41" identifier - number_literal) < number_literal) )) (compound_statement "{\n        bVar3 = bVar3 + 0x20;\n      }" { (expression_statement "bVar3 = bVar3 + 0x20;" (assignment_expression "bVar3 = bVar3 + 0x20" identifier = (binary_expression "bVar3 + 0x20" identifier + number_literal)) ;) })) (if_statement "if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" if (parenthesized_expression "(bVar1 < bVar3)" ( (binary_expression "bVar1 < bVar3" identifier < identifier) )) (compound_statement "{\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }" { (expression_statement "lVar8 = uVar4 - uVar2;" (assignment_expression "lVar8 = uVar4 - uVar2" identifier = (binary_expression "uVar4 - uVar2" identifier - identifier)) ;) (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" identifier = number_literal) ;) (expression_statement "uVar6 = uVar4;" (assignment_expression "uVar6 = uVar4" identifier = identifier) ;) }) (else_clause "else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" else (if_statement "if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" if (parenthesized_expression "(bVar1 == bVar3)" ( (binary_expression "bVar1 == bVar3" identifier == identifier) )) (compound_statement "{\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }" { (if_statement "if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }" if (parenthesized_expression "(lVar5 == lVar8)" ( (binary_expression "lVar5 == lVar8" identifier == identifier) )) (compound_statement "{\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }" { (expression_statement "uVar6 = uVar6 + lVar8;" (assignment_expression "uVar6 = uVar6 + lVar8" identifier = (binary_expression "uVar6 + lVar8" identifier + identifier)) ;) (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" identifier = number_literal) ;) }) (else_clause "else {\n          lVar5 = lVar5 + 1;\n        }" else (compound_statement "{\n          lVar5 = lVar5 + 1;\n        }" { (expression_statement "lVar5 = lVar5 + 1;" (assignment_expression "lVar5 = lVar5 + 1" identifier = (binary_expression "lVar5 + 1" identifier + number_literal)) ;) }))) }) (else_clause "else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" else (compound_statement "{\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" { (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" identifier = number_literal) ;) (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" identifier = number_literal) ;) (expression_statement "uVar2 = uVar6;" (assignment_expression "uVar2 = uVar6" identifier = identifier) ;) (expression_statement "uVar6 = uVar6 + 1;" (assignment_expression "uVar6 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) }))))) (expression_statement "uVar4 = uVar6 + lVar5;" (assignment_expression "uVar4 = uVar6 + lVar5" identifier = (binary_expression "uVar6 + lVar5" identifier + identifier)) ;) }) while (parenthesized_expression "(uVar4 < param_2)" ( (binary_expression "uVar4 < param_2" identifier < identifier) )) ;) (expression_statement "*param_3 = lVar8;" (assignment_expression "*param_3 = lVar8" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" identifier = number_literal) ;) (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" identifier = number_literal) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (expression_statement "uVar6 = 0xffffffffffffffff;" (assignment_expression "uVar6 = 0xffffffffffffffff" identifier = number_literal) ;) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) (do_statement "do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    } while (uVar4 < param_2);" do (compound_statement "{\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    }" { (expression_statement "bVar3 = *(byte *)(param_1 + uVar4);" (assignment_expression "bVar3 = *(byte *)(param_1 + uVar4)" identifier = (pointer_expression "*(byte *)(param_1 + uVar4)" * (cast_expression "(byte *)(param_1 + uVar4)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar4)" ( (binary_expression "param_1 + uVar4" identifier + identifier) ))))) ;) (expression_statement "bVar1 = bVar3 + 0x20;" (assignment_expression "bVar1 = bVar3 + 0x20" identifier = (binary_expression "bVar3 + 0x20" identifier + number_literal)) ;) (if_statement "if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }" if (parenthesized_expression "(0x19 < bVar3 - 0x41)" ( (binary_expression "0x19 < bVar3 - 0x41" number_literal < (binary_expression "bVar3 - 0x41" identifier - number_literal)) )) (compound_statement "{\n        bVar1 = bVar3;\n      }" { (expression_statement "bVar1 = bVar3;" (assignment_expression "bVar1 = bVar3" identifier = identifier) ;) })) (expression_statement "bVar3 = *(byte *)(param_1 + lVar8 + uVar6);" (assignment_expression "bVar3 = *(byte *)(param_1 + lVar8 + uVar6)" identifier = (pointer_expression "*(byte *)(param_1 + lVar8 + uVar6)" * (cast_expression "(byte *)(param_1 + lVar8 + uVar6)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + lVar8 + uVar6)" ( (binary_expression "param_1 + lVar8 + uVar6" (binary_expression "param_1 + lVar8" identifier + identifier) + identifier) ))))) ;) (if_statement "if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }" if (parenthesized_expression "(bVar3 - 0x41 < 0x1a)" ( (binary_expression "bVar3 - 0x41 < 0x1a" (binary_expression "bVar3 - 0x41" identifier - number_literal) < number_literal) )) (compound_statement "{\n        bVar3 = bVar3 + 0x20;\n      }" { (expression_statement "bVar3 = bVar3 + 0x20;" (assignment_expression "bVar3 = bVar3 + 0x20" identifier = (binary_expression "bVar3 + 0x20" identifier + number_literal)) ;) })) (if_statement "if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" if (parenthesized_expression "(bVar3 < bVar1)" ( (binary_expression "bVar3 < bVar1" identifier < identifier) )) (compound_statement "{\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }" { (expression_statement "lVar5 = uVar4 - uVar6;" (assignment_expression "lVar5 = uVar4 - uVar6" identifier = (binary_expression "uVar4 - uVar6" identifier - identifier)) ;) (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" identifier = number_literal) ;) (expression_statement "uVar7 = uVar4;" (assignment_expression "uVar7 = uVar4" identifier = identifier) ;) }) (else_clause "else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" else (if_statement "if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" if (parenthesized_expression "(bVar1 == bVar3)" ( (binary_expression "bVar1 == bVar3" identifier == identifier) )) (compound_statement "{\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }" { (if_statement "if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }" if (parenthesized_expression "(lVar8 == lVar5)" ( (binary_expression "lVar8 == lVar5" identifier == identifier) )) (compound_statement "{\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }" { (expression_statement "uVar7 = uVar7 + lVar5;" (assignment_expression "uVar7 = uVar7 + lVar5" identifier = (binary_expression "uVar7 + lVar5" identifier + identifier)) ;) (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" identifier = number_literal) ;) }) (else_clause "else {\n          lVar8 = lVar8 + 1;\n        }" else (compound_statement "{\n          lVar8 = lVar8 + 1;\n        }" { (expression_statement "lVar8 = lVar8 + 1;" (assignment_expression "lVar8 = lVar8 + 1" identifier = (binary_expression "lVar8 + 1" identifier + number_literal)) ;) }))) }) (else_clause "else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" else (compound_statement "{\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" { (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" identifier = number_literal) ;) (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" identifier = number_literal) ;) (expression_statement "uVar6 = uVar7;" (assignment_expression "uVar6 = uVar7" identifier = identifier) ;) (expression_statement "uVar7 = uVar7 + 1;" (assignment_expression "uVar7 = uVar7 + 1" identifier = (binary_expression "uVar7 + 1" identifier + number_literal)) ;) }))))) (expression_statement "uVar4 = lVar8 + uVar7;" (assignment_expression "uVar4 = lVar8 + uVar7" identifier = (binary_expression "lVar8 + uVar7" identifier + identifier)) ;) }) while (parenthesized_expression "(uVar4 < param_2)" ( (binary_expression "uVar4 < param_2" identifier < identifier) )) ;) (expression_statement "uVar4 = uVar2 + 1;" (assignment_expression "uVar4 = uVar2 + 1" identifier = (binary_expression "uVar2 + 1" identifier + number_literal)) ;) (if_statement "if (uVar2 + 1 <= uVar6 + 1) {\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }" if (parenthesized_expression "(uVar2 + 1 <= uVar6 + 1)" ( (binary_expression "uVar2 + 1 <= uVar6 + 1" (binary_expression "uVar2 + 1" identifier + number_literal) <= (binary_expression "uVar6 + 1" identifier + number_literal)) )) (compound_statement "{\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }" { (expression_statement "*param_3 = lVar5;" (assignment_expression "*param_3 = lVar5" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "uVar4 = uVar6 + 1;" (assignment_expression "uVar4 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) })) (return_statement "return uVar4;" return identifier ;) })) (expression_statement "*param_3 = 1;" (assignment_expression "*param_3 = 1" (pointer_expression "*param_3" * identifier) = number_literal) ;) (return_statement "return param_2 - 1;" return (binary_expression "param_2 - 1" identifier - number_literal) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (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 = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (binary_expression IDENT - LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + IDENT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (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 = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (binary_expression IDENT - LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + IDENT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) <= (binary_expression IDENT + LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (return_statement return IDENT ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return (binary_expression IDENT - LIT) ;) })))
(function_definition "ulong FUN_00141c58(long param_1,ulong param_2,long *param_3)\n\n{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  long lVar5;\n  ulong uVar6;\n  ulong uVar7;\n  long lVar8;\n  \n  if (2 < param_2) {\n    lVar8 = 1;\n    lVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    } while (uVar4 < param_2);\n    *param_3 = lVar8;\n    lVar5 = 1;\n    lVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    } while (uVar4 < param_2);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }\n  *param_3 = 1;\n  return param_2 - 1;\n}" (type_identifier "ulong") (function_declarator "FUN_00141c58(long param_1,ulong param_2,long *param_3)" (identifier "FUN_00141c58") (parameter_list "(long param_1,ulong param_2,long *param_3)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "ulong param_2" (type_identifier "ulong") (identifier "param_2")) (, ",") (parameter_declaration "long *param_3" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  byte bVar1;\n  ulong uVar2;\n  byte bVar3;\n  ulong uVar4;\n  long lVar5;\n  ulong uVar6;\n  ulong uVar7;\n  long lVar8;\n  \n  if (2 < param_2) {\n    lVar8 = 1;\n    lVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    } while (uVar4 < param_2);\n    *param_3 = lVar8;\n    lVar5 = 1;\n    lVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    } while (uVar4 < param_2);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }\n  *param_3 = 1;\n  return param_2 - 1;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "ulong uVar2;" (type_identifier "ulong") (identifier "uVar2") (; ";")) (declaration "byte bVar3;" (type_identifier "byte") (identifier "bVar3") (; ";")) (declaration "ulong uVar4;" (type_identifier "ulong") (identifier "uVar4") (; ";")) (declaration "long lVar5;" (sized_type_specifier "long" (long "long")) (identifier "lVar5") (; ";")) (declaration "ulong uVar6;" (type_identifier "ulong") (identifier "uVar6") (; ";")) (declaration "ulong uVar7;" (type_identifier "ulong") (identifier "uVar7") (; ";")) (declaration "long lVar8;" (sized_type_specifier "long" (long "long")) (identifier "lVar8") (; ";")) (if_statement "if (2 < param_2) {\n    lVar8 = 1;\n    lVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    } while (uVar4 < param_2);\n    *param_3 = lVar8;\n    lVar5 = 1;\n    lVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    } while (uVar4 < param_2);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }" (if "if") (parenthesized_expression "(2 < param_2)" (( "(") (binary_expression "2 < param_2" (number_literal "2") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    lVar8 = 1;\n    lVar5 = 1;\n    uVar6 = 0;\n    uVar2 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    } while (uVar4 < param_2);\n    *param_3 = lVar8;\n    lVar5 = 1;\n    lVar8 = 1;\n    uVar7 = 0;\n    uVar6 = 0xffffffffffffffff;\n    uVar4 = 1;\n    do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    } while (uVar4 < param_2);\n    uVar4 = uVar2 + 1;\n    if (uVar2 + 1 <= uVar6 + 1) {\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }\n    return uVar4;\n  }" ({ "{") (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" (identifier "lVar8") (= "=") (number_literal "1")) (; ";")) (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" (identifier "lVar5") (= "=") (number_literal "1")) (; ";")) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" (identifier "uVar6") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar2 = 0xffffffffffffffff;" (assignment_expression "uVar2 = 0xffffffffffffffff" (identifier "uVar2") (= "=") (number_literal "0xffffffffffffffff")) (; ";")) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" (identifier "uVar4") (= "=") (number_literal "1")) (; ";")) (do_statement "do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    } while (uVar4 < param_2);" (do "do") (compound_statement "{\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }\n      uVar4 = uVar6 + lVar5;\n    }" ({ "{") (expression_statement "bVar3 = *(byte *)(param_1 + uVar4);" (assignment_expression "bVar3 = *(byte *)(param_1 + uVar4)" (identifier "bVar3") (= "=") (pointer_expression "*(byte *)(param_1 + uVar4)" (* "*") (cast_expression "(byte *)(param_1 + uVar4)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + uVar4)" (( "(") (binary_expression "param_1 + uVar4" (identifier "param_1") (+ "+") (identifier "uVar4")) () ")"))))) (; ";")) (expression_statement "bVar1 = bVar3 + 0x20;" (assignment_expression "bVar1 = bVar3 + 0x20" (identifier "bVar1") (= "=") (binary_expression "bVar3 + 0x20" (identifier "bVar3") (+ "+") (number_literal "0x20"))) (; ";")) (if_statement "if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }" (if "if") (parenthesized_expression "(0x19 < bVar3 - 0x41)" (( "(") (binary_expression "0x19 < bVar3 - 0x41" (number_literal "0x19") (< "<") (binary_expression "bVar3 - 0x41" (identifier "bVar3") (- "-") (number_literal "0x41"))) () ")")) (compound_statement "{\n        bVar1 = bVar3;\n      }" ({ "{") (expression_statement "bVar1 = bVar3;" (assignment_expression "bVar1 = bVar3" (identifier "bVar1") (= "=") (identifier "bVar3")) (; ";")) (} "}"))) (expression_statement "bVar3 = *(byte *)(param_1 + lVar5 + uVar2);" (assignment_expression "bVar3 = *(byte *)(param_1 + lVar5 + uVar2)" (identifier "bVar3") (= "=") (pointer_expression "*(byte *)(param_1 + lVar5 + uVar2)" (* "*") (cast_expression "(byte *)(param_1 + lVar5 + uVar2)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + lVar5 + uVar2)" (( "(") (binary_expression "param_1 + lVar5 + uVar2" (binary_expression "param_1 + lVar5" (identifier "param_1") (+ "+") (identifier "lVar5")) (+ "+") (identifier "uVar2")) () ")"))))) (; ";")) (if_statement "if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }" (if "if") (parenthesized_expression "(bVar3 - 0x41 < 0x1a)" (( "(") (binary_expression "bVar3 - 0x41 < 0x1a" (binary_expression "bVar3 - 0x41" (identifier "bVar3") (- "-") (number_literal "0x41")) (< "<") (number_literal "0x1a")) () ")")) (compound_statement "{\n        bVar3 = bVar3 + 0x20;\n      }" ({ "{") (expression_statement "bVar3 = bVar3 + 0x20;" (assignment_expression "bVar3 = bVar3 + 0x20" (identifier "bVar3") (= "=") (binary_expression "bVar3 + 0x20" (identifier "bVar3") (+ "+") (number_literal "0x20"))) (; ";")) (} "}"))) (if_statement "if (bVar1 < bVar3) {\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" (if "if") (parenthesized_expression "(bVar1 < bVar3)" (( "(") (binary_expression "bVar1 < bVar3" (identifier "bVar1") (< "<") (identifier "bVar3")) () ")")) (compound_statement "{\n        lVar8 = uVar4 - uVar2;\n        lVar5 = 1;\n        uVar6 = uVar4;\n      }" ({ "{") (expression_statement "lVar8 = uVar4 - uVar2;" (assignment_expression "lVar8 = uVar4 - uVar2" (identifier "lVar8") (= "=") (binary_expression "uVar4 - uVar2" (identifier "uVar4") (- "-") (identifier "uVar2"))) (; ";")) (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" (identifier "lVar5") (= "=") (number_literal "1")) (; ";")) (expression_statement "uVar6 = uVar4;" (assignment_expression "uVar6 = uVar4" (identifier "uVar6") (= "=") (identifier "uVar4")) (; ";")) (} "}")) (else_clause "else if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" (else "else") (if_statement "if (bVar1 == bVar3) {\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }\n      else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" (if "if") (parenthesized_expression "(bVar1 == bVar3)" (( "(") (binary_expression "bVar1 == bVar3" (identifier "bVar1") (== "==") (identifier "bVar3")) () ")")) (compound_statement "{\n        if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }\n      }" ({ "{") (if_statement "if (lVar5 == lVar8) {\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }\n        else {\n          lVar5 = lVar5 + 1;\n        }" (if "if") (parenthesized_expression "(lVar5 == lVar8)" (( "(") (binary_expression "lVar5 == lVar8" (identifier "lVar5") (== "==") (identifier "lVar8")) () ")")) (compound_statement "{\n          uVar6 = uVar6 + lVar8;\n          lVar5 = 1;\n        }" ({ "{") (expression_statement "uVar6 = uVar6 + lVar8;" (assignment_expression "uVar6 = uVar6 + lVar8" (identifier "uVar6") (= "=") (binary_expression "uVar6 + lVar8" (identifier "uVar6") (+ "+") (identifier "lVar8"))) (; ";")) (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" (identifier "lVar5") (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else {\n          lVar5 = lVar5 + 1;\n        }" (else "else") (compound_statement "{\n          lVar5 = lVar5 + 1;\n        }" ({ "{") (expression_statement "lVar5 = lVar5 + 1;" (assignment_expression "lVar5 = lVar5 + 1" (identifier "lVar5") (= "=") (binary_expression "lVar5 + 1" (identifier "lVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" (else "else") (compound_statement "{\n        lVar8 = 1;\n        lVar5 = 1;\n        uVar2 = uVar6;\n        uVar6 = uVar6 + 1;\n      }" ({ "{") (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" (identifier "lVar8") (= "=") (number_literal "1")) (; ";")) (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" (identifier "lVar5") (= "=") (number_literal "1")) (; ";")) (expression_statement "uVar2 = uVar6;" (assignment_expression "uVar2 = uVar6" (identifier "uVar2") (= "=") (identifier "uVar6")) (; ";")) (expression_statement "uVar6 = uVar6 + 1;" (assignment_expression "uVar6 = uVar6 + 1" (identifier "uVar6") (= "=") (binary_expression "uVar6 + 1" (identifier "uVar6") (+ "+") (number_literal "1"))) (; ";")) (} "}")))))) (expression_statement "uVar4 = uVar6 + lVar5;" (assignment_expression "uVar4 = uVar6 + lVar5" (identifier "uVar4") (= "=") (binary_expression "uVar6 + lVar5" (identifier "uVar6") (+ "+") (identifier "lVar5"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar4 < param_2)" (( "(") (binary_expression "uVar4 < param_2" (identifier "uVar4") (< "<") (identifier "param_2")) () ")")) (; ";")) (expression_statement "*param_3 = lVar8;" (assignment_expression "*param_3 = lVar8" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "lVar8")) (; ";")) (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" (identifier "lVar5") (= "=") (number_literal "1")) (; ";")) (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" (identifier "lVar8") (= "=") (number_literal "1")) (; ";")) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" (identifier "uVar7") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar6 = 0xffffffffffffffff;" (assignment_expression "uVar6 = 0xffffffffffffffff" (identifier "uVar6") (= "=") (number_literal "0xffffffffffffffff")) (; ";")) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" (identifier "uVar4") (= "=") (number_literal "1")) (; ";")) (do_statement "do {\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    } while (uVar4 < param_2);" (do "do") (compound_statement "{\n      bVar3 = *(byte *)(param_1 + uVar4);\n      bVar1 = bVar3 + 0x20;\n      if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }\n      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);\n      if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }\n      if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }\n      uVar4 = lVar8 + uVar7;\n    }" ({ "{") (expression_statement "bVar3 = *(byte *)(param_1 + uVar4);" (assignment_expression "bVar3 = *(byte *)(param_1 + uVar4)" (identifier "bVar3") (= "=") (pointer_expression "*(byte *)(param_1 + uVar4)" (* "*") (cast_expression "(byte *)(param_1 + uVar4)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + uVar4)" (( "(") (binary_expression "param_1 + uVar4" (identifier "param_1") (+ "+") (identifier "uVar4")) () ")"))))) (; ";")) (expression_statement "bVar1 = bVar3 + 0x20;" (assignment_expression "bVar1 = bVar3 + 0x20" (identifier "bVar1") (= "=") (binary_expression "bVar3 + 0x20" (identifier "bVar3") (+ "+") (number_literal "0x20"))) (; ";")) (if_statement "if (0x19 < bVar3 - 0x41) {\n        bVar1 = bVar3;\n      }" (if "if") (parenthesized_expression "(0x19 < bVar3 - 0x41)" (( "(") (binary_expression "0x19 < bVar3 - 0x41" (number_literal "0x19") (< "<") (binary_expression "bVar3 - 0x41" (identifier "bVar3") (- "-") (number_literal "0x41"))) () ")")) (compound_statement "{\n        bVar1 = bVar3;\n      }" ({ "{") (expression_statement "bVar1 = bVar3;" (assignment_expression "bVar1 = bVar3" (identifier "bVar1") (= "=") (identifier "bVar3")) (; ";")) (} "}"))) (expression_statement "bVar3 = *(byte *)(param_1 + lVar8 + uVar6);" (assignment_expression "bVar3 = *(byte *)(param_1 + lVar8 + uVar6)" (identifier "bVar3") (= "=") (pointer_expression "*(byte *)(param_1 + lVar8 + uVar6)" (* "*") (cast_expression "(byte *)(param_1 + lVar8 + uVar6)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + lVar8 + uVar6)" (( "(") (binary_expression "param_1 + lVar8 + uVar6" (binary_expression "param_1 + lVar8" (identifier "param_1") (+ "+") (identifier "lVar8")) (+ "+") (identifier "uVar6")) () ")"))))) (; ";")) (if_statement "if (bVar3 - 0x41 < 0x1a) {\n        bVar3 = bVar3 + 0x20;\n      }" (if "if") (parenthesized_expression "(bVar3 - 0x41 < 0x1a)" (( "(") (binary_expression "bVar3 - 0x41 < 0x1a" (binary_expression "bVar3 - 0x41" (identifier "bVar3") (- "-") (number_literal "0x41")) (< "<") (number_literal "0x1a")) () ")")) (compound_statement "{\n        bVar3 = bVar3 + 0x20;\n      }" ({ "{") (expression_statement "bVar3 = bVar3 + 0x20;" (assignment_expression "bVar3 = bVar3 + 0x20" (identifier "bVar3") (= "=") (binary_expression "bVar3 + 0x20" (identifier "bVar3") (+ "+") (number_literal "0x20"))) (; ";")) (} "}"))) (if_statement "if (bVar3 < bVar1) {\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }\n      else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" (if "if") (parenthesized_expression "(bVar3 < bVar1)" (( "(") (binary_expression "bVar3 < bVar1" (identifier "bVar3") (< "<") (identifier "bVar1")) () ")")) (compound_statement "{\n        lVar5 = uVar4 - uVar6;\n        lVar8 = 1;\n        uVar7 = uVar4;\n      }" ({ "{") (expression_statement "lVar5 = uVar4 - uVar6;" (assignment_expression "lVar5 = uVar4 - uVar6" (identifier "lVar5") (= "=") (binary_expression "uVar4 - uVar6" (identifier "uVar4") (- "-") (identifier "uVar6"))) (; ";")) (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" (identifier "lVar8") (= "=") (number_literal "1")) (; ";")) (expression_statement "uVar7 = uVar4;" (assignment_expression "uVar7 = uVar4" (identifier "uVar7") (= "=") (identifier "uVar4")) (; ";")) (} "}")) (else_clause "else if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" (else "else") (if_statement "if (bVar1 == bVar3) {\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }\n      else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" (if "if") (parenthesized_expression "(bVar1 == bVar3)" (( "(") (binary_expression "bVar1 == bVar3" (identifier "bVar1") (== "==") (identifier "bVar3")) () ")")) (compound_statement "{\n        if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }\n      }" ({ "{") (if_statement "if (lVar8 == lVar5) {\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }\n        else {\n          lVar8 = lVar8 + 1;\n        }" (if "if") (parenthesized_expression "(lVar8 == lVar5)" (( "(") (binary_expression "lVar8 == lVar5" (identifier "lVar8") (== "==") (identifier "lVar5")) () ")")) (compound_statement "{\n          uVar7 = uVar7 + lVar5;\n          lVar8 = 1;\n        }" ({ "{") (expression_statement "uVar7 = uVar7 + lVar5;" (assignment_expression "uVar7 = uVar7 + lVar5" (identifier "uVar7") (= "=") (binary_expression "uVar7 + lVar5" (identifier "uVar7") (+ "+") (identifier "lVar5"))) (; ";")) (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" (identifier "lVar8") (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else {\n          lVar8 = lVar8 + 1;\n        }" (else "else") (compound_statement "{\n          lVar8 = lVar8 + 1;\n        }" ({ "{") (expression_statement "lVar8 = lVar8 + 1;" (assignment_expression "lVar8 = lVar8 + 1" (identifier "lVar8") (= "=") (binary_expression "lVar8 + 1" (identifier "lVar8") (+ "+") (number_literal "1"))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" (else "else") (compound_statement "{\n        lVar5 = 1;\n        lVar8 = 1;\n        uVar6 = uVar7;\n        uVar7 = uVar7 + 1;\n      }" ({ "{") (expression_statement "lVar5 = 1;" (assignment_expression "lVar5 = 1" (identifier "lVar5") (= "=") (number_literal "1")) (; ";")) (expression_statement "lVar8 = 1;" (assignment_expression "lVar8 = 1" (identifier "lVar8") (= "=") (number_literal "1")) (; ";")) (expression_statement "uVar6 = uVar7;" (assignment_expression "uVar6 = uVar7" (identifier "uVar6") (= "=") (identifier "uVar7")) (; ";")) (expression_statement "uVar7 = uVar7 + 1;" (assignment_expression "uVar7 = uVar7 + 1" (identifier "uVar7") (= "=") (binary_expression "uVar7 + 1" (identifier "uVar7") (+ "+") (number_literal "1"))) (; ";")) (} "}")))))) (expression_statement "uVar4 = lVar8 + uVar7;" (assignment_expression "uVar4 = lVar8 + uVar7" (identifier "uVar4") (= "=") (binary_expression "lVar8 + uVar7" (identifier "lVar8") (+ "+") (identifier "uVar7"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar4 < param_2)" (( "(") (binary_expression "uVar4 < param_2" (identifier "uVar4") (< "<") (identifier "param_2")) () ")")) (; ";")) (expression_statement "uVar4 = uVar2 + 1;" (assignment_expression "uVar4 = uVar2 + 1" (identifier "uVar4") (= "=") (binary_expression "uVar2 + 1" (identifier "uVar2") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (uVar2 + 1 <= uVar6 + 1) {\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }" (if "if") (parenthesized_expression "(uVar2 + 1 <= uVar6 + 1)" (( "(") (binary_expression "uVar2 + 1 <= uVar6 + 1" (binary_expression "uVar2 + 1" (identifier "uVar2") (+ "+") (number_literal "1")) (<= "<=") (binary_expression "uVar6 + 1" (identifier "uVar6") (+ "+") (number_literal "1"))) () ")")) (compound_statement "{\n      *param_3 = lVar5;\n      uVar4 = uVar6 + 1;\n    }" ({ "{") (expression_statement "*param_3 = lVar5;" (assignment_expression "*param_3 = lVar5" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "lVar5")) (; ";")) (expression_statement "uVar4 = uVar6 + 1;" (assignment_expression "uVar4 = uVar6 + 1" (identifier "uVar4") (= "=") (binary_expression "uVar6 + 1" (identifier "uVar6") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}"))) (expression_statement "*param_3 = 1;" (assignment_expression "*param_3 = 1" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "1")) (; ";")) (return_statement "return param_2 - 1;" (return "return") (binary_expression "param_2 - 1" (identifier "param_2") (- "-") (number_literal "1")) (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

size_t function_1(type_1 *needle,size_t var_1,size_t *period)

{
  type_2 var_5;
  type_3 var_3;
  type_2 var_2;
  type_3 var_6;
  size_t var_4;
  type_3 var_8;
  type_3 var_9;
  size_t var_7;
  
  if (2 < var_1) {
    var_7 = 1;
    var_4 = 1;
    var_8 = 0;
    var_3 = 0xffffffffffffffff;
    var_6 = 1;
    do {
      var_2 = needle[var_6];
      var_5 = var_2 + 0x20;
      if (0x19 < var_2 - 0x41) {
        var_5 = var_2;
      }
      var_2 = needle[var_3 + var_4];
      if (var_2 - 0x41 < 0x1a) {
        var_2 = var_2 + 0x20;
      }
      if (var_5 < var_2) {
        var_7 = var_6 - var_3;
        var_4 = 1;
        var_8 = var_6;
      }
      else if (var_5 == var_2) {
        if (var_4 == var_7) {
          var_8 = var_8 + var_7;
          var_4 = 1;
        }
        else {
          var_4 = var_4 + 1;
        }
      }
      else {
        var_7 = 1;
        var_4 = 1;
        var_3 = var_8;
        var_8 = var_8 + 1;
      }
      var_6 = var_8 + var_4;
    } while (var_6 < var_1);
    *period = var_7;
    var_4 = 1;
    var_7 = 1;
    var_9 = 0;
    var_8 = 0xffffffffffffffff;
    var_6 = 1;
    do {
      var_2 = needle[var_6];
      var_5 = var_2 + 0x20;
      if (0x19 < var_2 - 0x41) {
        var_5 = var_2;
      }
      var_2 = needle[var_8 + var_7];
      if (var_2 - 0x41 < 0x1a) {
        var_2 = var_2 + 0x20;
      }
      if (var_2 < var_5) {
        var_4 = var_6 - var_8;
        var_7 = 1;
        var_9 = var_6;
      }
      else if (var_5 == var_2) {
        if (var_7 == var_4) {
          var_9 = var_9 + var_4;
          var_7 = 1;
        }
        else {
          var_7 = var_7 + 1;
        }
      }
      else {
        var_4 = 1;
        var_7 = 1;
        var_8 = var_9;
        var_9 = var_9 + 1;
      }
      var_6 = var_7 + var_9;
    } while (var_6 < var_1);
    var_6 = var_3 + 1;
    if (var_3 + 1 <= var_8 + 1) {
      *period = var_4;
      var_6 = var_8 + 1;
    }
    return var_6;
  }
  *period = 1;
  return var_1 - 1;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement 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: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (binary_expression left: (identifier) right: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (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: (binary_expression left: (identifier) right: (identifier)) right: (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) 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: (identifier))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement 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: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (binary_expression left: (identifier) right: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (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: (binary_expression left: (identifier) right: (identifier)) right: (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) 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: (identifier))))) condition: (parenthesized_expression (binary_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: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (return_statement (binary_expression left: (identifier) right: (number_literal))))))

ulong MASKED(long param_1,ulong param_2,long *param_3)

{
  byte bVar1;
  ulong uVar2;
  byte bVar3;
  ulong uVar4;
  long lVar5;
  ulong uVar6;
  ulong uVar7;
  long lVar8;
  
  if (2 < param_2) {
    lVar8 = 1;
    lVar5 = 1;
    uVar6 = 0;
    uVar2 = 0xffffffffffffffff;
    uVar4 = 1;
    do {
      bVar3 = *(byte *)(param_1 + uVar4);
      bVar1 = bVar3 + 0x20;
      if (0x19 < bVar3 - 0x41) {
        bVar1 = bVar3;
      }
      bVar3 = *(byte *)(param_1 + lVar5 + uVar2);
      if (bVar3 - 0x41 < 0x1a) {
        bVar3 = bVar3 + 0x20;
      }
      if (bVar1 < bVar3) {
        lVar8 = uVar4 - uVar2;
        lVar5 = 1;
        uVar6 = uVar4;
      }
      else if (bVar1 == bVar3) {
        if (lVar5 == lVar8) {
          uVar6 = uVar6 + lVar8;
          lVar5 = 1;
        }
        else {
          lVar5 = lVar5 + 1;
        }
      }
      else {
        lVar8 = 1;
        lVar5 = 1;
        uVar2 = uVar6;
        uVar6 = uVar6 + 1;
      }
      uVar4 = uVar6 + lVar5;
    } while (uVar4 < param_2);
    *param_3 = lVar8;
    lVar5 = 1;
    lVar8 = 1;
    uVar7 = 0;
    uVar6 = 0xffffffffffffffff;
    uVar4 = 1;
    do {
      bVar3 = *(byte *)(param_1 + uVar4);
      bVar1 = bVar3 + 0x20;
      if (0x19 < bVar3 - 0x41) {
        bVar1 = bVar3;
      }
      bVar3 = *(byte *)(param_1 + lVar8 + uVar6);
      if (bVar3 - 0x41 < 0x1a) {
        bVar3 = bVar3 + 0x20;
      }
      if (bVar3 < bVar1) {
        lVar5 = uVar4 - uVar6;
        lVar8 = 1;
        uVar7 = uVar4;
      }
      else if (bVar1 == bVar3) {
        if (lVar8 == lVar5) {
          uVar7 = uVar7 + lVar5;
          lVar8 = 1;
        }
        else {
          lVar8 = lVar8 + 1;
        }
      }
      else {
        lVar5 = 1;
        lVar8 = 1;
        uVar6 = uVar7;
        uVar7 = uVar7 + 1;
      }
      uVar4 = lVar8 + uVar7;
    } while (uVar4 < param_2);
    uVar4 = uVar2 + 1;
    if (uVar2 + 1 <= uVar6 + 1) {
      *param_3 = lVar5;
      uVar4 = uVar6 + 1;
    }
    return uVar4;
  }
  *param_3 = 1;
  return param_2 - 1;
}

