
int sqlite3Fts5UnicodeFold(int c,int eRemoveDiacritic)

{
  int iVar1;
  int iVar2;
  int iVar3;
  uint uVar4;
  int ret;
  long lVar5;
  
  if (c < 0x80) {
    iVar2 = c + 0x20;
    if (0x19 < c - 0x41U) {
      iVar2 = c;
    }
    return iVar2;
  }
  if (0xffff < c) {
    iVar2 = c + 0x28;
    if (0x27 < c - 0x10400U) {
      iVar2 = c;
    }
    return iVar2;
  }
  uVar4 = 0x3f1;
  lVar5 = -1;
  iVar3 = 0;
  iVar2 = 0xa2;
  iVar1 = 0xa2;
  do {
    iVar1 = iVar1 >> 1;
    if ((int)(c - uVar4) < 0) {
      iVar2 = iVar1 + -1;
      if (iVar2 < iVar3) goto LAB_0012795a;
    }
    else {
      iVar3 = iVar1 + 1;
      lVar5 = (long)iVar1;
      if (iVar2 < iVar3) {
LAB_0012795a:
        if ((c < (int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +
                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))) &&
           (((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &
            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)) == 0)) {
          c = (int)(ushort)((short)c +
                           *(short *)(aiOff_44559 +
                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2));
        }
        if (eRemoveDiacritic == 0) {
          return c;
        }
        iVar2 = remove_diacritic(c,(uint)(eRemoveDiacritic == 2));
        return iVar2;
      }
    }
    iVar1 = iVar3 + iVar2;
    uVar4 = (uint)*(ushort *)(aEntry_54519 + (long)(iVar1 >> 1) * 4);
  } while( true );
}



ulong FUN_001278e0(ulong param_1,int param_2)

{
  int iVar1;
  ulong uVar2;
  int iVar3;
  uint uVar4;
  uint uVar5;
  int iVar6;
  long lVar7;
  
  uVar5 = (uint)param_1;
  if ((int)uVar5 < 0x80) {
    uVar2 = (ulong)(uVar5 + 0x20);
    if (0x19 < uVar5 - 0x41) {
      uVar2 = param_1 & 0xffffffff;
    }
    return uVar2;
  }
  if (0xffff < (int)uVar5) {
    uVar2 = (ulong)(uVar5 + 0x28);
    if (0x27 < uVar5 - 0x10400) {
      uVar2 = param_1 & 0xffffffff;
    }
    return uVar2;
  }
  uVar4 = 0x3f1;
  lVar7 = -1;
  iVar3 = 0;
  iVar6 = 0xa2;
  iVar1 = 0xa2;
  do {
    iVar1 = iVar1 >> 1;
    if ((int)(uVar5 - uVar4) < 0) {
      iVar6 = iVar1 + -1;
      if (iVar6 < iVar3) goto LAB_0012795a;
    }
    else {
      iVar3 = iVar1 + 1;
      lVar7 = (long)iVar1;
      if (iVar6 < iVar3) {
LAB_0012795a:
        if ((int)uVar5 <
            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +
                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {
          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &
              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {
            param_1 = (ulong)(ushort)((short)param_1 +
                                     *(short *)(&DAT_001ef180 +
                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));
          }
        }
        if (param_2 == 0) {
          return param_1 & 0xffffffff;
        }
        uVar2 = FUN_00114260(param_1,param_2 == 2);
        return uVar2;
      }
    }
    iVar1 = iVar3 + iVar6;
    uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);
  } while( true );
}


CMP EDI,0x7f
JG 0x001278f8
LEA EDX,[RDI + -0x41]
LEA EAX,[RDI + 0x20]
CMP EDX,0x1a
CMOVNC EAX,EDI
RET
CMP EDI,0xffff
JG 0x001279a0
MOV EDX,0x3f1
MOV R10,-0x1
XOR ECX,ECX
MOV R8D,0xa2
MOV EAX,0xa2
LEA R9,[0x1ef560]
JMP 0x0012794b
LEA ECX,[RAX + 0x1]
MOVSXD R10,EAX
CMP ECX,R8D
JG 0x0012795a
LEA EAX,[RCX + R8*0x1]
MOV EDX,EAX
SAR EDX,0x1
MOVSXD RDX,EDX
MOVZX EDX,word ptr [R9 + RDX*0x4]
SAR EAX,0x1
CMP EDI,EDX
JNS 0x00127930
LEA R8D,[RAX + -0x1]
CMP ECX,R8D
JLE 0x0012793b
MOVZX EDX,word ptr [R9 + R10*0x4]
MOVZX EAX,byte ptr [R9 + R10*0x4 + 0x3]
ADD EAX,EDX
CMP EDI,EAX
JGE 0x0012798f
MOVZX EAX,byte ptr [R9 + R10*0x4 + 0x2]
XOR EDX,EDI
MOV ECX,EAX
AND ECX,0x1
TEST ECX,EDX
JNZ 0x0012798f
SHR AL,0x1
LEA RDX,[0x1ef180]
AND EAX,0x7f
ADD DI,word ptr [RDX + RAX*0x2]
MOVZX EDI,DI
MOV EAX,EDI
TEST ESI,ESI
JNZ 0x001279b0
RET
LEA EDX,[RDI + -0x10400]
LEA EAX,[RDI + 0x28]
CMP EDX,0x28
CMOVNC EAX,EDI
RET
CMP ESI,0x2
SETZ SIL
MOVZX ESI,SIL
JMP 0x00114260
(translation_unit "ulong FUN_001278e0(ulong param_1,int param_2)\n\n{\n  int iVar1;\n  ulong uVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  long lVar7;\n  \n  uVar5 = (uint)param_1;\n  if ((int)uVar5 < 0x80) {\n    uVar2 = (ulong)(uVar5 + 0x20);\n    if (0x19 < uVar5 - 0x41) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }\n  if (0xffff < (int)uVar5) {\n    uVar2 = (ulong)(uVar5 + 0x28);\n    if (0x27 < uVar5 - 0x10400) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }\n  uVar4 = 0x3f1;\n  lVar7 = -1;\n  iVar3 = 0;\n  iVar6 = 0xa2;\n  iVar1 = 0xa2;\n  do {\n    iVar1 = iVar1 >> 1;\n    if ((int)(uVar5 - uVar4) < 0) {\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar6;\n    uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);\n  } while( true );\n}\n\n" (function_definition "ulong FUN_001278e0(ulong param_1,int param_2)\n\n{\n  int iVar1;\n  ulong uVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  long lVar7;\n  \n  uVar5 = (uint)param_1;\n  if ((int)uVar5 < 0x80) {\n    uVar2 = (ulong)(uVar5 + 0x20);\n    if (0x19 < uVar5 - 0x41) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }\n  if (0xffff < (int)uVar5) {\n    uVar2 = (ulong)(uVar5 + 0x28);\n    if (0x27 < uVar5 - 0x10400) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }\n  uVar4 = 0x3f1;\n  lVar7 = -1;\n  iVar3 = 0;\n  iVar6 = 0xa2;\n  iVar1 = 0xa2;\n  do {\n    iVar1 = iVar1 >> 1;\n    if ((int)(uVar5 - uVar4) < 0) {\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar6;\n    uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);\n  } while( true );\n}" type_identifier (function_declarator "FUN_001278e0(ulong param_1,int param_2)" identifier (parameter_list "(ulong param_1,int param_2)" ( (parameter_declaration "ulong param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  ulong uVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  long lVar7;\n  \n  uVar5 = (uint)param_1;\n  if ((int)uVar5 < 0x80) {\n    uVar2 = (ulong)(uVar5 + 0x20);\n    if (0x19 < uVar5 - 0x41) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }\n  if (0xffff < (int)uVar5) {\n    uVar2 = (ulong)(uVar5 + 0x28);\n    if (0x27 < uVar5 - 0x10400) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }\n  uVar4 = 0x3f1;\n  lVar7 = -1;\n  iVar3 = 0;\n  iVar6 = 0xa2;\n  iVar1 = 0xa2;\n  do {\n    iVar1 = iVar1 >> 1;\n    if ((int)(uVar5 - uVar4) < 0) {\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar6;\n    uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "long lVar7;" (sized_type_specifier "long" long) identifier ;) (expression_statement "uVar5 = (uint)param_1;" (assignment_expression "uVar5 = (uint)param_1" identifier = (cast_expression "(uint)param_1" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if ((int)uVar5 < 0x80) {\n    uVar2 = (ulong)(uVar5 + 0x20);\n    if (0x19 < uVar5 - 0x41) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }" if (parenthesized_expression "((int)uVar5 < 0x80)" ( (binary_expression "(int)uVar5 < 0x80" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n    uVar2 = (ulong)(uVar5 + 0x20);\n    if (0x19 < uVar5 - 0x41) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }" { (expression_statement "uVar2 = (ulong)(uVar5 + 0x20);" (assignment_expression "uVar2 = (ulong)(uVar5 + 0x20)" identifier = (call_expression "(ulong)(uVar5 + 0x20)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(uVar5 + 0x20)" ( (binary_expression "uVar5 + 0x20" identifier + number_literal) )))) ;) (if_statement "if (0x19 < uVar5 - 0x41) {\n      uVar2 = param_1 & 0xffffffff;\n    }" if (parenthesized_expression "(0x19 < uVar5 - 0x41)" ( (binary_expression "0x19 < uVar5 - 0x41" number_literal < (binary_expression "uVar5 - 0x41" identifier - number_literal)) )) (compound_statement "{\n      uVar2 = param_1 & 0xffffffff;\n    }" { (expression_statement "uVar2 = param_1 & 0xffffffff;" (assignment_expression "uVar2 = param_1 & 0xffffffff" identifier = (binary_expression "param_1 & 0xffffffff" identifier & number_literal)) ;) })) (return_statement "return uVar2;" return identifier ;) })) (if_statement "if (0xffff < (int)uVar5) {\n    uVar2 = (ulong)(uVar5 + 0x28);\n    if (0x27 < uVar5 - 0x10400) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }" if (parenthesized_expression "(0xffff < (int)uVar5)" ( (binary_expression "0xffff < (int)uVar5" number_literal < (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    uVar2 = (ulong)(uVar5 + 0x28);\n    if (0x27 < uVar5 - 0x10400) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }" { (expression_statement "uVar2 = (ulong)(uVar5 + 0x28);" (assignment_expression "uVar2 = (ulong)(uVar5 + 0x28)" identifier = (call_expression "(ulong)(uVar5 + 0x28)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(uVar5 + 0x28)" ( (binary_expression "uVar5 + 0x28" identifier + number_literal) )))) ;) (if_statement "if (0x27 < uVar5 - 0x10400) {\n      uVar2 = param_1 & 0xffffffff;\n    }" if (parenthesized_expression "(0x27 < uVar5 - 0x10400)" ( (binary_expression "0x27 < uVar5 - 0x10400" number_literal < (binary_expression "uVar5 - 0x10400" identifier - number_literal)) )) (compound_statement "{\n      uVar2 = param_1 & 0xffffffff;\n    }" { (expression_statement "uVar2 = param_1 & 0xffffffff;" (assignment_expression "uVar2 = param_1 & 0xffffffff" identifier = (binary_expression "param_1 & 0xffffffff" identifier & number_literal)) ;) })) (return_statement "return uVar2;" return identifier ;) })) (expression_statement "uVar4 = 0x3f1;" (assignment_expression "uVar4 = 0x3f1" identifier = number_literal) ;) (expression_statement "lVar7 = -1;" (assignment_expression "lVar7 = -1" identifier = number_literal) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "iVar6 = 0xa2;" (assignment_expression "iVar6 = 0xa2" identifier = number_literal) ;) (expression_statement "iVar1 = 0xa2;" (assignment_expression "iVar1 = 0xa2" identifier = number_literal) ;) (do_statement "do {\n    iVar1 = iVar1 >> 1;\n    if ((int)(uVar5 - uVar4) < 0) {\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar6;\n    uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);\n  } while( true );" do (compound_statement "{\n    iVar1 = iVar1 >> 1;\n    if ((int)(uVar5 - uVar4) < 0) {\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar6;\n    uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);\n  }" { (expression_statement "iVar1 = iVar1 >> 1;" (assignment_expression "iVar1 = iVar1 >> 1" identifier = (binary_expression "iVar1 >> 1" identifier >> number_literal)) ;) (if_statement "if ((int)(uVar5 - uVar4) < 0) {\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }" if (parenthesized_expression "((int)(uVar5 - uVar4) < 0)" ( (binary_expression "(int)(uVar5 - uVar4) < 0" (cast_expression "(int)(uVar5 - uVar4)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar5 - uVar4)" ( (binary_expression "uVar5 - uVar4" identifier - identifier) ))) < number_literal) )) (compound_statement "{\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }" { (expression_statement "iVar6 = iVar1 + -1;" (assignment_expression "iVar6 = iVar1 + -1" identifier = (binary_expression "iVar1 + -1" identifier + number_literal)) ;) (if_statement "if (iVar6 < iVar3) goto LAB_0012795a;" if (parenthesized_expression "(iVar6 < iVar3)" ( (binary_expression "iVar6 < iVar3" identifier < identifier) )) (goto_statement "goto LAB_0012795a;" goto statement_identifier ;)) }) (else_clause "else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }" else (compound_statement "{\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }" { (expression_statement "iVar3 = iVar1 + 1;" (assignment_expression "iVar3 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "lVar7 = (long)iVar1;" (assignment_expression "lVar7 = (long)iVar1" identifier = (cast_expression "(long)iVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (if_statement "if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }" if (parenthesized_expression "(iVar6 < iVar3)" ( (binary_expression "iVar6 < iVar3" identifier < identifier) )) (compound_statement "{\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }" { (labeled_statement "LAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }" statement_identifier : (if_statement "if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }" if (parenthesized_expression "((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4)))" ( (binary_expression "(int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) < (cast_expression "(int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))" ( (binary_expression "(uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4)" (subscript_expression "(uint)(byte)(&UNK_001ef563)[lVar7 * 4]" (call_expression "(uint)(byte)(&UNK_001ef563)" (call_expression "(uint)(byte)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(byte)" ( identifier ))) (argument_list "(&UNK_001ef563)" ( (pointer_expression "&UNK_001ef563" & identifier) ))) [ (binary_expression "lVar7 * 4" identifier * number_literal) ]) + (binary_expression "(uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)(&DAT_001ef560 + lVar7 * 4)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_001ef560 + lVar7 * 4)" ( (binary_expression "&DAT_001ef560 + lVar7 * 4" (pointer_expression "&DAT_001ef560" & identifier) + (binary_expression "lVar7 * 4" identifier * number_literal)) ))))) )))) )) (compound_statement "{\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }" { (if_statement "if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }" if (parenthesized_expression "(((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0)" ( (binary_expression "((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0" (parenthesized_expression "((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5))" ( (binary_expression "(byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)" (binary_expression "(byte)(&UNK_001ef562)[lVar7 * 4] & 1" (subscript_expression "(byte)(&UNK_001ef562)[lVar7 * 4]" (call_expression "(byte)(&UNK_001ef562)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(&UNK_001ef562)" ( (pointer_expression "&UNK_001ef562" & identifier) ))) [ (binary_expression "lVar7 * 4" identifier * number_literal) ]) & number_literal) & (parenthesized_expression "(*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)" ( (binary_expression "*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5" (pointer_expression "*(ushort *)(&DAT_001ef560 + lVar7 * 4)" * (cast_expression "(ushort *)(&DAT_001ef560 + lVar7 * 4)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_001ef560 + lVar7 * 4)" ( (binary_expression "&DAT_001ef560 + lVar7 * 4" (pointer_expression "&DAT_001ef560" & identifier) + (binary_expression "lVar7 * 4" identifier * number_literal)) )))) ^ identifier) ))) )) == number_literal) )) (compound_statement "{\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }" { (expression_statement "param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));" (assignment_expression "param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2))" identifier = (call_expression "(ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2))" (call_expression "(ulong)(ushort)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(ushort)" ( identifier ))) (argument_list "((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2))" ( (binary_expression "(short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2)" (cast_expression "(short)param_1" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) + (pointer_expression "*(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2)" * (cast_expression "(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2)" ( (binary_expression "&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2" (pointer_expression "&DAT_001ef180" & identifier) + (binary_expression "(ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2" (call_expression "(ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "((byte)(&UNK_001ef562)[lVar7 * 4] >> 1)" ( (binary_expression "(byte)(&UNK_001ef562)[lVar7 * 4] >> 1" (subscript_expression "(byte)(&UNK_001ef562)[lVar7 * 4]" (call_expression "(byte)(&UNK_001ef562)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(&UNK_001ef562)" ( (pointer_expression "&UNK_001ef562" & identifier) ))) [ (binary_expression "lVar7 * 4" identifier * number_literal) ]) >> number_literal) ))) * number_literal)) ))))) )))) ;) })) }))) (if_statement "if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n          return param_1 & 0xffffffff;\n        }" { (return_statement "return param_1 & 0xffffffff;" return (binary_expression "param_1 & 0xffffffff" identifier & number_literal) ;) })) (expression_statement "uVar2 = FUN_00114260(param_1,param_2 == 2);" (assignment_expression "uVar2 = FUN_00114260(param_1,param_2 == 2)" identifier = (call_expression "FUN_00114260(param_1,param_2 == 2)" identifier (argument_list "(param_1,param_2 == 2)" ( identifier , (binary_expression "param_2 == 2" identifier == number_literal) )))) ;) (return_statement "return uVar2;" return identifier ;) })) }))) (expression_statement "iVar1 = iVar3 + iVar6;" (assignment_expression "iVar1 = iVar3 + iVar6" identifier = (binary_expression "iVar3 + iVar6" identifier + identifier)) ;) (expression_statement "uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);" (assignment_expression "uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4)" identifier = (binary_expression "(uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_001ef560 + (long)(iVar1 >> 1) * 4)" ( (binary_expression "&DAT_001ef560 + (long)(iVar1 >> 1) * 4" (pointer_expression "&DAT_001ef560" & identifier) + (binary_expression "(long)(iVar1 >> 1) * 4" (cast_expression "(long)(iVar1 >> 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar1 >> 1)" ( (binary_expression "iVar1 >> 1" identifier >> number_literal) ))) * number_literal)) ))))) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "int sqlite3Fts5UnicodeFold(int c,int eRemoveDiacritic)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  int ret;\n  long lVar5;\n  \n  if (c < 0x80) {\n    iVar2 = c + 0x20;\n    if (0x19 < c - 0x41U) {\n      iVar2 = c;\n    }\n    return iVar2;\n  }\n  if (0xffff < c) {\n    iVar2 = c + 0x28;\n    if (0x27 < c - 0x10400U) {\n      iVar2 = c;\n    }\n    return iVar2;\n  }\n  uVar4 = 0x3f1;\n  lVar5 = -1;\n  iVar3 = 0;\n  iVar2 = 0xa2;\n  iVar1 = 0xa2;\n  do {\n    iVar1 = iVar1 >> 1;\n    if ((int)(c - uVar4) < 0) {\n      iVar2 = iVar1 + -1;\n      if (iVar2 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar5 = (long)iVar1;\n      if (iVar2 < iVar3) {\nLAB_0012795a:\n        if ((c < (int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))) &&\n           (((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)) == 0)) {\n          c = (int)(ushort)((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2));\n        }\n        if (eRemoveDiacritic == 0) {\n          return c;\n        }\n        iVar2 = remove_diacritic(c,(uint)(eRemoveDiacritic == 2));\n        return iVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar2;\n    uVar4 = (uint)*(ushort *)(aEntry_54519 + (long)(iVar1 >> 1) * 4);\n  } while( true );\n}\n\n" (function_definition "int sqlite3Fts5UnicodeFold(int c,int eRemoveDiacritic)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  int ret;\n  long lVar5;\n  \n  if (c < 0x80) {\n    iVar2 = c + 0x20;\n    if (0x19 < c - 0x41U) {\n      iVar2 = c;\n    }\n    return iVar2;\n  }\n  if (0xffff < c) {\n    iVar2 = c + 0x28;\n    if (0x27 < c - 0x10400U) {\n      iVar2 = c;\n    }\n    return iVar2;\n  }\n  uVar4 = 0x3f1;\n  lVar5 = -1;\n  iVar3 = 0;\n  iVar2 = 0xa2;\n  iVar1 = 0xa2;\n  do {\n    iVar1 = iVar1 >> 1;\n    if ((int)(c - uVar4) < 0) {\n      iVar2 = iVar1 + -1;\n      if (iVar2 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar5 = (long)iVar1;\n      if (iVar2 < iVar3) {\nLAB_0012795a:\n        if ((c < (int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))) &&\n           (((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)) == 0)) {\n          c = (int)(ushort)((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2));\n        }\n        if (eRemoveDiacritic == 0) {\n          return c;\n        }\n        iVar2 = remove_diacritic(c,(uint)(eRemoveDiacritic == 2));\n        return iVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar2;\n    uVar4 = (uint)*(ushort *)(aEntry_54519 + (long)(iVar1 >> 1) * 4);\n  } while( true );\n}" primitive_type (function_declarator "sqlite3Fts5UnicodeFold(int c,int eRemoveDiacritic)" identifier (parameter_list "(int c,int eRemoveDiacritic)" ( (parameter_declaration "int c" primitive_type identifier) , (parameter_declaration "int eRemoveDiacritic" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  int ret;\n  long lVar5;\n  \n  if (c < 0x80) {\n    iVar2 = c + 0x20;\n    if (0x19 < c - 0x41U) {\n      iVar2 = c;\n    }\n    return iVar2;\n  }\n  if (0xffff < c) {\n    iVar2 = c + 0x28;\n    if (0x27 < c - 0x10400U) {\n      iVar2 = c;\n    }\n    return iVar2;\n  }\n  uVar4 = 0x3f1;\n  lVar5 = -1;\n  iVar3 = 0;\n  iVar2 = 0xa2;\n  iVar1 = 0xa2;\n  do {\n    iVar1 = iVar1 >> 1;\n    if ((int)(c - uVar4) < 0) {\n      iVar2 = iVar1 + -1;\n      if (iVar2 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar5 = (long)iVar1;\n      if (iVar2 < iVar3) {\nLAB_0012795a:\n        if ((c < (int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))) &&\n           (((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)) == 0)) {\n          c = (int)(ushort)((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2));\n        }\n        if (eRemoveDiacritic == 0) {\n          return c;\n        }\n        iVar2 = remove_diacritic(c,(uint)(eRemoveDiacritic == 2));\n        return iVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar2;\n    uVar4 = (uint)*(ushort *)(aEntry_54519 + (long)(iVar1 >> 1) * 4);\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int ret;" primitive_type identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (if_statement "if (c < 0x80) {\n    iVar2 = c + 0x20;\n    if (0x19 < c - 0x41U) {\n      iVar2 = c;\n    }\n    return iVar2;\n  }" if (parenthesized_expression "(c < 0x80)" ( (binary_expression "c < 0x80" identifier < number_literal) )) (compound_statement "{\n    iVar2 = c + 0x20;\n    if (0x19 < c - 0x41U) {\n      iVar2 = c;\n    }\n    return iVar2;\n  }" { (expression_statement "iVar2 = c + 0x20;" (assignment_expression "iVar2 = c + 0x20" identifier = (binary_expression "c + 0x20" identifier + number_literal)) ;) (if_statement "if (0x19 < c - 0x41U) {\n      iVar2 = c;\n    }" if (parenthesized_expression "(0x19 < c - 0x41U)" ( (binary_expression "0x19 < c - 0x41U" number_literal < (binary_expression "c - 0x41U" identifier - number_literal)) )) (compound_statement "{\n      iVar2 = c;\n    }" { (expression_statement "iVar2 = c;" (assignment_expression "iVar2 = c" identifier = identifier) ;) })) (return_statement "return iVar2;" return identifier ;) })) (if_statement "if (0xffff < c) {\n    iVar2 = c + 0x28;\n    if (0x27 < c - 0x10400U) {\n      iVar2 = c;\n    }\n    return iVar2;\n  }" if (parenthesized_expression "(0xffff < c)" ( (binary_expression "0xffff < c" number_literal < identifier) )) (compound_statement "{\n    iVar2 = c + 0x28;\n    if (0x27 < c - 0x10400U) {\n      iVar2 = c;\n    }\n    return iVar2;\n  }" { (expression_statement "iVar2 = c + 0x28;" (assignment_expression "iVar2 = c + 0x28" identifier = (binary_expression "c + 0x28" identifier + number_literal)) ;) (if_statement "if (0x27 < c - 0x10400U) {\n      iVar2 = c;\n    }" if (parenthesized_expression "(0x27 < c - 0x10400U)" ( (binary_expression "0x27 < c - 0x10400U" number_literal < (binary_expression "c - 0x10400U" identifier - number_literal)) )) (compound_statement "{\n      iVar2 = c;\n    }" { (expression_statement "iVar2 = c;" (assignment_expression "iVar2 = c" identifier = identifier) ;) })) (return_statement "return iVar2;" return identifier ;) })) (expression_statement "uVar4 = 0x3f1;" (assignment_expression "uVar4 = 0x3f1" identifier = number_literal) ;) (expression_statement "lVar5 = -1;" (assignment_expression "lVar5 = -1" identifier = number_literal) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "iVar2 = 0xa2;" (assignment_expression "iVar2 = 0xa2" identifier = number_literal) ;) (expression_statement "iVar1 = 0xa2;" (assignment_expression "iVar1 = 0xa2" identifier = number_literal) ;) (do_statement "do {\n    iVar1 = iVar1 >> 1;\n    if ((int)(c - uVar4) < 0) {\n      iVar2 = iVar1 + -1;\n      if (iVar2 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar5 = (long)iVar1;\n      if (iVar2 < iVar3) {\nLAB_0012795a:\n        if ((c < (int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))) &&\n           (((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)) == 0)) {\n          c = (int)(ushort)((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2));\n        }\n        if (eRemoveDiacritic == 0) {\n          return c;\n        }\n        iVar2 = remove_diacritic(c,(uint)(eRemoveDiacritic == 2));\n        return iVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar2;\n    uVar4 = (uint)*(ushort *)(aEntry_54519 + (long)(iVar1 >> 1) * 4);\n  } while( true );" do (compound_statement "{\n    iVar1 = iVar1 >> 1;\n    if ((int)(c - uVar4) < 0) {\n      iVar2 = iVar1 + -1;\n      if (iVar2 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar5 = (long)iVar1;\n      if (iVar2 < iVar3) {\nLAB_0012795a:\n        if ((c < (int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))) &&\n           (((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)) == 0)) {\n          c = (int)(ushort)((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2));\n        }\n        if (eRemoveDiacritic == 0) {\n          return c;\n        }\n        iVar2 = remove_diacritic(c,(uint)(eRemoveDiacritic == 2));\n        return iVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar2;\n    uVar4 = (uint)*(ushort *)(aEntry_54519 + (long)(iVar1 >> 1) * 4);\n  }" { (expression_statement "iVar1 = iVar1 >> 1;" (assignment_expression "iVar1 = iVar1 >> 1" identifier = (binary_expression "iVar1 >> 1" identifier >> number_literal)) ;) (if_statement "if ((int)(c - uVar4) < 0) {\n      iVar2 = iVar1 + -1;\n      if (iVar2 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar5 = (long)iVar1;\n      if (iVar2 < iVar3) {\nLAB_0012795a:\n        if ((c < (int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))) &&\n           (((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)) == 0)) {\n          c = (int)(ushort)((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2));\n        }\n        if (eRemoveDiacritic == 0) {\n          return c;\n        }\n        iVar2 = remove_diacritic(c,(uint)(eRemoveDiacritic == 2));\n        return iVar2;\n      }\n    }" if (parenthesized_expression "((int)(c - uVar4) < 0)" ( (binary_expression "(int)(c - uVar4) < 0" (cast_expression "(int)(c - uVar4)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(c - uVar4)" ( (binary_expression "c - uVar4" identifier - identifier) ))) < number_literal) )) (compound_statement "{\n      iVar2 = iVar1 + -1;\n      if (iVar2 < iVar3) goto LAB_0012795a;\n    }" { (expression_statement "iVar2 = iVar1 + -1;" (assignment_expression "iVar2 = iVar1 + -1" identifier = (binary_expression "iVar1 + -1" identifier + number_literal)) ;) (if_statement "if (iVar2 < iVar3) goto LAB_0012795a;" if (parenthesized_expression "(iVar2 < iVar3)" ( (binary_expression "iVar2 < iVar3" identifier < identifier) )) (goto_statement "goto LAB_0012795a;" goto statement_identifier ;)) }) (else_clause "else {\n      iVar3 = iVar1 + 1;\n      lVar5 = (long)iVar1;\n      if (iVar2 < iVar3) {\nLAB_0012795a:\n        if ((c < (int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))) &&\n           (((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)) == 0)) {\n          c = (int)(ushort)((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2));\n        }\n        if (eRemoveDiacritic == 0) {\n          return c;\n        }\n        iVar2 = remove_diacritic(c,(uint)(eRemoveDiacritic == 2));\n        return iVar2;\n      }\n    }" else (compound_statement "{\n      iVar3 = iVar1 + 1;\n      lVar5 = (long)iVar1;\n      if (iVar2 < iVar3) {\nLAB_0012795a:\n        if ((c < (int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))) &&\n           (((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)) == 0)) {\n          c = (int)(ushort)((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2));\n        }\n        if (eRemoveDiacritic == 0) {\n          return c;\n        }\n        iVar2 = remove_diacritic(c,(uint)(eRemoveDiacritic == 2));\n        return iVar2;\n      }\n    }" { (expression_statement "iVar3 = iVar1 + 1;" (assignment_expression "iVar3 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "lVar5 = (long)iVar1;" (assignment_expression "lVar5 = (long)iVar1" identifier = (cast_expression "(long)iVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (if_statement "if (iVar2 < iVar3) {\nLAB_0012795a:\n        if ((c < (int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))) &&\n           (((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)) == 0)) {\n          c = (int)(ushort)((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2));\n        }\n        if (eRemoveDiacritic == 0) {\n          return c;\n        }\n        iVar2 = remove_diacritic(c,(uint)(eRemoveDiacritic == 2));\n        return iVar2;\n      }" if (parenthesized_expression "(iVar2 < iVar3)" ( (binary_expression "iVar2 < iVar3" identifier < identifier) )) (compound_statement "{\nLAB_0012795a:\n        if ((c < (int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))) &&\n           (((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)) == 0)) {\n          c = (int)(ushort)((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2));\n        }\n        if (eRemoveDiacritic == 0) {\n          return c;\n        }\n        iVar2 = remove_diacritic(c,(uint)(eRemoveDiacritic == 2));\n        return iVar2;\n      }" { (labeled_statement "LAB_0012795a:\n        if ((c < (int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))) &&\n           (((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)) == 0)) {\n          c = (int)(ushort)((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2));\n        }" statement_identifier : (if_statement "if ((c < (int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))) &&\n           (((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)) == 0)) {\n          c = (int)(ushort)((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2));\n        }" if (parenthesized_expression "((c < (int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))) &&\n           (((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)) == 0))" ( (binary_expression "(c < (int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))) &&\n           (((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)) == 0)" (parenthesized_expression "(c < (int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4)))" ( (binary_expression "c < (int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))" identifier < (cast_expression "(int)((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4))" ( (binary_expression "(uint)(byte)aEntry_54519[lVar5 * 4 + 3] +\n                      (uint)*(ushort *)(aEntry_54519 + lVar5 * 4)" (cast_expression "(uint)(byte)aEntry_54519[lVar5 * 4 + 3]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)aEntry_54519[lVar5 * 4 + 3]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "aEntry_54519[lVar5 * 4 + 3]" identifier [ (binary_expression "lVar5 * 4 + 3" (binary_expression "lVar5 * 4" identifier * number_literal) + number_literal) ]))) + (binary_expression "(uint)*(ushort *)(aEntry_54519 + lVar5 * 4)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)(aEntry_54519 + lVar5 * 4)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(aEntry_54519 + lVar5 * 4)" ( (binary_expression "aEntry_54519 + lVar5 * 4" identifier + (binary_expression "lVar5 * 4" identifier * number_literal)) ))))) )))) )) && (parenthesized_expression "(((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)) == 0)" ( (binary_expression "((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)) == 0" (parenthesized_expression "((byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c))" ( (binary_expression "(byte)aEntry_54519[lVar5 * 4 + 2] & 1 &\n            ((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)" (binary_expression "(byte)aEntry_54519[lVar5 * 4 + 2] & 1" (cast_expression "(byte)aEntry_54519[lVar5 * 4 + 2]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "aEntry_54519[lVar5 * 4 + 2]" identifier [ (binary_expression "lVar5 * 4 + 2" (binary_expression "lVar5 * 4" identifier * number_literal) + number_literal) ])) & number_literal) & (parenthesized_expression "((uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c)" ( (binary_expression "(uint)*(ushort *)(aEntry_54519 + lVar5 * 4) ^ c" (binary_expression "(uint)*(ushort *)(aEntry_54519 + lVar5 * 4)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)(aEntry_54519 + lVar5 * 4)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(aEntry_54519 + lVar5 * 4)" ( (binary_expression "aEntry_54519 + lVar5 * 4" identifier + (binary_expression "lVar5 * 4" identifier * number_literal)) )))) ^ identifier) ))) )) == number_literal) ))) )) (compound_statement "{\n          c = (int)(ushort)((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2));\n        }" { (expression_statement "c = (int)(ushort)((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2));" (assignment_expression "c = (int)(ushort)((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2))" identifier = (cast_expression "(int)(ushort)((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2))" ( (type_descriptor "int" primitive_type) ) (call_expression "(ushort)((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2))" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "((short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2))" ( (binary_expression "(short)c +\n                           *(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2)" (cast_expression "(short)c" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) + (pointer_expression "*(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2)" * (cast_expression "(short *)(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2)" ( (binary_expression "aiOff_44559 +\n                                     (ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2" identifier + (binary_expression "(ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1) * 2" (call_expression "(ulong)((byte)aEntry_54519[lVar5 * 4 + 2] >> 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "((byte)aEntry_54519[lVar5 * 4 + 2] >> 1)" ( (binary_expression "(byte)aEntry_54519[lVar5 * 4 + 2] >> 1" (cast_expression "(byte)aEntry_54519[lVar5 * 4 + 2]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "aEntry_54519[lVar5 * 4 + 2]" identifier [ (binary_expression "lVar5 * 4 + 2" (binary_expression "lVar5 * 4" identifier * number_literal) + number_literal) ])) >> number_literal) ))) * number_literal)) ))))) ))))) ;) }))) (if_statement "if (eRemoveDiacritic == 0) {\n          return c;\n        }" if (parenthesized_expression "(eRemoveDiacritic == 0)" ( (binary_expression "eRemoveDiacritic == 0" identifier == number_literal) )) (compound_statement "{\n          return c;\n        }" { (return_statement "return c;" return identifier ;) })) (expression_statement "iVar2 = remove_diacritic(c,(uint)(eRemoveDiacritic == 2));" (assignment_expression "iVar2 = remove_diacritic(c,(uint)(eRemoveDiacritic == 2))" identifier = (call_expression "remove_diacritic(c,(uint)(eRemoveDiacritic == 2))" identifier (argument_list "(c,(uint)(eRemoveDiacritic == 2))" ( identifier , (call_expression "(uint)(eRemoveDiacritic == 2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(eRemoveDiacritic == 2)" ( (binary_expression "eRemoveDiacritic == 2" identifier == number_literal) ))) )))) ;) (return_statement "return iVar2;" return identifier ;) })) }))) (expression_statement "iVar1 = iVar3 + iVar2;" (assignment_expression "iVar1 = iVar3 + iVar2" identifier = (binary_expression "iVar3 + iVar2" identifier + identifier)) ;) (expression_statement "uVar4 = (uint)*(ushort *)(aEntry_54519 + (long)(iVar1 >> 1) * 4);" (assignment_expression "uVar4 = (uint)*(ushort *)(aEntry_54519 + (long)(iVar1 >> 1) * 4)" identifier = (binary_expression "(uint)*(ushort *)(aEntry_54519 + (long)(iVar1 >> 1) * 4)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)(aEntry_54519 + (long)(iVar1 >> 1) * 4)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(aEntry_54519 + (long)(iVar1 >> 1) * 4)" ( (binary_expression "aEntry_54519 + (long)(iVar1 >> 1) * 4" identifier + (binary_expression "(long)(iVar1 >> 1) * 4" (cast_expression "(long)(iVar1 >> 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar1 >> 1)" ( (binary_expression "iVar1 >> 1" identifier >> number_literal) ))) * number_literal)) ))))) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "ulong FUN_001278e0(ulong param_1,int param_2)\n\n{\n  int iVar1;\n  ulong uVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  long lVar7;\n  \n  uVar5 = (uint)param_1;\n  if ((int)uVar5 < 0x80) {\n    uVar2 = (ulong)(uVar5 + 0x20);\n    if (0x19 < uVar5 - 0x41) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }\n  if (0xffff < (int)uVar5) {\n    uVar2 = (ulong)(uVar5 + 0x28);\n    if (0x27 < uVar5 - 0x10400) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }\n  uVar4 = 0x3f1;\n  lVar7 = -1;\n  iVar3 = 0;\n  iVar6 = 0xa2;\n  iVar1 = 0xa2;\n  do {\n    iVar1 = iVar1 >> 1;\n    if ((int)(uVar5 - uVar4) < 0) {\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar6;\n    uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);\n  } while( true );\n}\n\n" (function_definition "ulong FUN_001278e0(ulong param_1,int param_2)\n\n{\n  int iVar1;\n  ulong uVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  long lVar7;\n  \n  uVar5 = (uint)param_1;\n  if ((int)uVar5 < 0x80) {\n    uVar2 = (ulong)(uVar5 + 0x20);\n    if (0x19 < uVar5 - 0x41) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }\n  if (0xffff < (int)uVar5) {\n    uVar2 = (ulong)(uVar5 + 0x28);\n    if (0x27 < uVar5 - 0x10400) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }\n  uVar4 = 0x3f1;\n  lVar7 = -1;\n  iVar3 = 0;\n  iVar6 = 0xa2;\n  iVar1 = 0xa2;\n  do {\n    iVar1 = iVar1 >> 1;\n    if ((int)(uVar5 - uVar4) < 0) {\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar6;\n    uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);\n  } while( true );\n}" type_identifier (function_declarator "FUN_001278e0(ulong param_1,int param_2)" identifier (parameter_list "(ulong param_1,int param_2)" ( (parameter_declaration "ulong param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  ulong uVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  long lVar7;\n  \n  uVar5 = (uint)param_1;\n  if ((int)uVar5 < 0x80) {\n    uVar2 = (ulong)(uVar5 + 0x20);\n    if (0x19 < uVar5 - 0x41) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }\n  if (0xffff < (int)uVar5) {\n    uVar2 = (ulong)(uVar5 + 0x28);\n    if (0x27 < uVar5 - 0x10400) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }\n  uVar4 = 0x3f1;\n  lVar7 = -1;\n  iVar3 = 0;\n  iVar6 = 0xa2;\n  iVar1 = 0xa2;\n  do {\n    iVar1 = iVar1 >> 1;\n    if ((int)(uVar5 - uVar4) < 0) {\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar6;\n    uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "long lVar7;" (sized_type_specifier "long" long) identifier ;) (expression_statement "uVar5 = (uint)param_1;" (assignment_expression "uVar5 = (uint)param_1" identifier = (cast_expression "(uint)param_1" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if ((int)uVar5 < 0x80) {\n    uVar2 = (ulong)(uVar5 + 0x20);\n    if (0x19 < uVar5 - 0x41) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }" if (parenthesized_expression "((int)uVar5 < 0x80)" ( (binary_expression "(int)uVar5 < 0x80" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n    uVar2 = (ulong)(uVar5 + 0x20);\n    if (0x19 < uVar5 - 0x41) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }" { (expression_statement "uVar2 = (ulong)(uVar5 + 0x20);" (assignment_expression "uVar2 = (ulong)(uVar5 + 0x20)" identifier = (call_expression "(ulong)(uVar5 + 0x20)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(uVar5 + 0x20)" ( (binary_expression "uVar5 + 0x20" identifier + number_literal) )))) ;) (if_statement "if (0x19 < uVar5 - 0x41) {\n      uVar2 = param_1 & 0xffffffff;\n    }" if (parenthesized_expression "(0x19 < uVar5 - 0x41)" ( (binary_expression "0x19 < uVar5 - 0x41" number_literal < (binary_expression "uVar5 - 0x41" identifier - number_literal)) )) (compound_statement "{\n      uVar2 = param_1 & 0xffffffff;\n    }" { (expression_statement "uVar2 = param_1 & 0xffffffff;" (assignment_expression "uVar2 = param_1 & 0xffffffff" identifier = (binary_expression "param_1 & 0xffffffff" identifier & number_literal)) ;) })) (return_statement "return uVar2;" return identifier ;) })) (if_statement "if (0xffff < (int)uVar5) {\n    uVar2 = (ulong)(uVar5 + 0x28);\n    if (0x27 < uVar5 - 0x10400) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }" if (parenthesized_expression "(0xffff < (int)uVar5)" ( (binary_expression "0xffff < (int)uVar5" number_literal < (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    uVar2 = (ulong)(uVar5 + 0x28);\n    if (0x27 < uVar5 - 0x10400) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }" { (expression_statement "uVar2 = (ulong)(uVar5 + 0x28);" (assignment_expression "uVar2 = (ulong)(uVar5 + 0x28)" identifier = (call_expression "(ulong)(uVar5 + 0x28)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(uVar5 + 0x28)" ( (binary_expression "uVar5 + 0x28" identifier + number_literal) )))) ;) (if_statement "if (0x27 < uVar5 - 0x10400) {\n      uVar2 = param_1 & 0xffffffff;\n    }" if (parenthesized_expression "(0x27 < uVar5 - 0x10400)" ( (binary_expression "0x27 < uVar5 - 0x10400" number_literal < (binary_expression "uVar5 - 0x10400" identifier - number_literal)) )) (compound_statement "{\n      uVar2 = param_1 & 0xffffffff;\n    }" { (expression_statement "uVar2 = param_1 & 0xffffffff;" (assignment_expression "uVar2 = param_1 & 0xffffffff" identifier = (binary_expression "param_1 & 0xffffffff" identifier & number_literal)) ;) })) (return_statement "return uVar2;" return identifier ;) })) (expression_statement "uVar4 = 0x3f1;" (assignment_expression "uVar4 = 0x3f1" identifier = number_literal) ;) (expression_statement "lVar7 = -1;" (assignment_expression "lVar7 = -1" identifier = number_literal) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "iVar6 = 0xa2;" (assignment_expression "iVar6 = 0xa2" identifier = number_literal) ;) (expression_statement "iVar1 = 0xa2;" (assignment_expression "iVar1 = 0xa2" identifier = number_literal) ;) (do_statement "do {\n    iVar1 = iVar1 >> 1;\n    if ((int)(uVar5 - uVar4) < 0) {\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar6;\n    uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);\n  } while( true );" do (compound_statement "{\n    iVar1 = iVar1 >> 1;\n    if ((int)(uVar5 - uVar4) < 0) {\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar6;\n    uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);\n  }" { (expression_statement "iVar1 = iVar1 >> 1;" (assignment_expression "iVar1 = iVar1 >> 1" identifier = (binary_expression "iVar1 >> 1" identifier >> number_literal)) ;) (if_statement "if ((int)(uVar5 - uVar4) < 0) {\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }" if (parenthesized_expression "((int)(uVar5 - uVar4) < 0)" ( (binary_expression "(int)(uVar5 - uVar4) < 0" (cast_expression "(int)(uVar5 - uVar4)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar5 - uVar4)" ( (binary_expression "uVar5 - uVar4" identifier - identifier) ))) < number_literal) )) (compound_statement "{\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }" { (expression_statement "iVar6 = iVar1 + -1;" (assignment_expression "iVar6 = iVar1 + -1" identifier = (binary_expression "iVar1 + -1" identifier + number_literal)) ;) (if_statement "if (iVar6 < iVar3) goto LAB_0012795a;" if (parenthesized_expression "(iVar6 < iVar3)" ( (binary_expression "iVar6 < iVar3" identifier < identifier) )) (goto_statement "goto LAB_0012795a;" goto statement_identifier ;)) }) (else_clause "else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }" else (compound_statement "{\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }" { (expression_statement "iVar3 = iVar1 + 1;" (assignment_expression "iVar3 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "lVar7 = (long)iVar1;" (assignment_expression "lVar7 = (long)iVar1" identifier = (cast_expression "(long)iVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (if_statement "if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }" if (parenthesized_expression "(iVar6 < iVar3)" ( (binary_expression "iVar6 < iVar3" identifier < identifier) )) (compound_statement "{\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }" { (labeled_statement "LAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }" statement_identifier : (if_statement "if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }" if (parenthesized_expression "((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4)))" ( (binary_expression "(int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))" (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) < (cast_expression "(int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))" ( (binary_expression "(uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4)" (subscript_expression "(uint)(byte)(&UNK_001ef563)[lVar7 * 4]" (call_expression "(uint)(byte)(&UNK_001ef563)" (call_expression "(uint)(byte)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(byte)" ( identifier ))) (argument_list "(&UNK_001ef563)" ( (pointer_expression "&UNK_001ef563" & identifier) ))) [ (binary_expression "lVar7 * 4" identifier * number_literal) ]) + (binary_expression "(uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)(&DAT_001ef560 + lVar7 * 4)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_001ef560 + lVar7 * 4)" ( (binary_expression "&DAT_001ef560 + lVar7 * 4" (pointer_expression "&DAT_001ef560" & identifier) + (binary_expression "lVar7 * 4" identifier * number_literal)) ))))) )))) )) (compound_statement "{\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }" { (if_statement "if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }" if (parenthesized_expression "(((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0)" ( (binary_expression "((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0" (parenthesized_expression "((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5))" ( (binary_expression "(byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)" (binary_expression "(byte)(&UNK_001ef562)[lVar7 * 4] & 1" (subscript_expression "(byte)(&UNK_001ef562)[lVar7 * 4]" (call_expression "(byte)(&UNK_001ef562)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(&UNK_001ef562)" ( (pointer_expression "&UNK_001ef562" & identifier) ))) [ (binary_expression "lVar7 * 4" identifier * number_literal) ]) & number_literal) & (parenthesized_expression "(*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)" ( (binary_expression "*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5" (pointer_expression "*(ushort *)(&DAT_001ef560 + lVar7 * 4)" * (cast_expression "(ushort *)(&DAT_001ef560 + lVar7 * 4)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_001ef560 + lVar7 * 4)" ( (binary_expression "&DAT_001ef560 + lVar7 * 4" (pointer_expression "&DAT_001ef560" & identifier) + (binary_expression "lVar7 * 4" identifier * number_literal)) )))) ^ identifier) ))) )) == number_literal) )) (compound_statement "{\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }" { (expression_statement "param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));" (assignment_expression "param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2))" identifier = (call_expression "(ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2))" (call_expression "(ulong)(ushort)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(ushort)" ( identifier ))) (argument_list "((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2))" ( (binary_expression "(short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2)" (cast_expression "(short)param_1" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) + (pointer_expression "*(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2)" * (cast_expression "(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2)" ( (binary_expression "&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2" (pointer_expression "&DAT_001ef180" & identifier) + (binary_expression "(ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2" (call_expression "(ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "((byte)(&UNK_001ef562)[lVar7 * 4] >> 1)" ( (binary_expression "(byte)(&UNK_001ef562)[lVar7 * 4] >> 1" (subscript_expression "(byte)(&UNK_001ef562)[lVar7 * 4]" (call_expression "(byte)(&UNK_001ef562)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(&UNK_001ef562)" ( (pointer_expression "&UNK_001ef562" & identifier) ))) [ (binary_expression "lVar7 * 4" identifier * number_literal) ]) >> number_literal) ))) * number_literal)) ))))) )))) ;) })) }))) (if_statement "if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n          return param_1 & 0xffffffff;\n        }" { (return_statement "return param_1 & 0xffffffff;" return (binary_expression "param_1 & 0xffffffff" identifier & number_literal) ;) })) (expression_statement "uVar2 = FUN_00114260(param_1,param_2 == 2);" (assignment_expression "uVar2 = FUN_00114260(param_1,param_2 == 2)" identifier = (call_expression "FUN_00114260(param_1,param_2 == 2)" identifier (argument_list "(param_1,param_2 == 2)" ( identifier , (binary_expression "param_2 == 2" identifier == number_literal) )))) ;) (return_statement "return uVar2;" return identifier ;) })) }))) (expression_statement "iVar1 = iVar3 + iVar6;" (assignment_expression "iVar1 = iVar3 + iVar6" identifier = (binary_expression "iVar3 + iVar6" identifier + identifier)) ;) (expression_statement "uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);" (assignment_expression "uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4)" identifier = (binary_expression "(uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_001ef560 + (long)(iVar1 >> 1) * 4)" ( (binary_expression "&DAT_001ef560 + (long)(iVar1 >> 1) * 4" (pointer_expression "&DAT_001ef560" & identifier) + (binary_expression "(long)(iVar1 >> 1) * 4" (cast_expression "(long)(iVar1 >> 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar1 >> 1)" ( (binary_expression "iVar1 >> 1" identifier >> number_literal) ))) * number_literal)) ))))) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (binary_expression IDENT - LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) })) (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (binary_expression IDENT - LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) })) (return_statement return 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 = (binary_expression IDENT >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT - IDENT) ))) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (subscript_expression (call_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( IDENT ))) (argument_list ( (pointer_expression & IDENT) ))) [ (binary_expression IDENT * LIT) ]) + (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + (binary_expression IDENT * LIT)) ))))) )))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (pointer_expression & IDENT) ))) [ (binary_expression IDENT * LIT) ]) & LIT) & (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + (binary_expression IDENT * LIT)) )))) ^ IDENT) ))) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( IDENT ))) (argument_list ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier short)) ) IDENT) + (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (pointer_expression & IDENT) ))) [ (binary_expression IDENT * LIT) ]) >> LIT) ))) * LIT)) ))))) )))) ;) })) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return (binary_expression IDENT & LIT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT == LIT) )))) ;) (return_statement return IDENT ;) })) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression IDENT >> LIT) ))) * LIT)) ))))) ;) }) while (parenthesized_expression ( BOOL )) ;) })))
(function_definition "ulong FUN_001278e0(ulong param_1,int param_2)\n\n{\n  int iVar1;\n  ulong uVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  long lVar7;\n  \n  uVar5 = (uint)param_1;\n  if ((int)uVar5 < 0x80) {\n    uVar2 = (ulong)(uVar5 + 0x20);\n    if (0x19 < uVar5 - 0x41) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }\n  if (0xffff < (int)uVar5) {\n    uVar2 = (ulong)(uVar5 + 0x28);\n    if (0x27 < uVar5 - 0x10400) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }\n  uVar4 = 0x3f1;\n  lVar7 = -1;\n  iVar3 = 0;\n  iVar6 = 0xa2;\n  iVar1 = 0xa2;\n  do {\n    iVar1 = iVar1 >> 1;\n    if ((int)(uVar5 - uVar4) < 0) {\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar6;\n    uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);\n  } while( true );\n}" (type_identifier "ulong") (function_declarator "FUN_001278e0(ulong param_1,int param_2)" (identifier "FUN_001278e0") (parameter_list "(ulong param_1,int param_2)" (( "(") (parameter_declaration "ulong param_1" (type_identifier "ulong") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  ulong uVar2;\n  int iVar3;\n  uint uVar4;\n  uint uVar5;\n  int iVar6;\n  long lVar7;\n  \n  uVar5 = (uint)param_1;\n  if ((int)uVar5 < 0x80) {\n    uVar2 = (ulong)(uVar5 + 0x20);\n    if (0x19 < uVar5 - 0x41) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }\n  if (0xffff < (int)uVar5) {\n    uVar2 = (ulong)(uVar5 + 0x28);\n    if (0x27 < uVar5 - 0x10400) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }\n  uVar4 = 0x3f1;\n  lVar7 = -1;\n  iVar3 = 0;\n  iVar6 = 0xa2;\n  iVar1 = 0xa2;\n  do {\n    iVar1 = iVar1 >> 1;\n    if ((int)(uVar5 - uVar4) < 0) {\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar6;\n    uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);\n  } while( true );\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "ulong uVar2;" (type_identifier "ulong") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "long lVar7;" (sized_type_specifier "long" (long "long")) (identifier "lVar7") (; ";")) (expression_statement "uVar5 = (uint)param_1;" (assignment_expression "uVar5 = (uint)param_1" (identifier "uVar5") (= "=") (cast_expression "(uint)param_1" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "param_1"))) (; ";")) (if_statement "if ((int)uVar5 < 0x80) {\n    uVar2 = (ulong)(uVar5 + 0x20);\n    if (0x19 < uVar5 - 0x41) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }" (if "if") (parenthesized_expression "((int)uVar5 < 0x80)" (( "(") (binary_expression "(int)uVar5 < 0x80" (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5")) (< "<") (number_literal "0x80")) () ")")) (compound_statement "{\n    uVar2 = (ulong)(uVar5 + 0x20);\n    if (0x19 < uVar5 - 0x41) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }" ({ "{") (expression_statement "uVar2 = (ulong)(uVar5 + 0x20);" (assignment_expression "uVar2 = (ulong)(uVar5 + 0x20)" (identifier "uVar2") (= "=") (call_expression "(ulong)(uVar5 + 0x20)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(uVar5 + 0x20)" (( "(") (binary_expression "uVar5 + 0x20" (identifier "uVar5") (+ "+") (number_literal "0x20")) () ")")))) (; ";")) (if_statement "if (0x19 < uVar5 - 0x41) {\n      uVar2 = param_1 & 0xffffffff;\n    }" (if "if") (parenthesized_expression "(0x19 < uVar5 - 0x41)" (( "(") (binary_expression "0x19 < uVar5 - 0x41" (number_literal "0x19") (< "<") (binary_expression "uVar5 - 0x41" (identifier "uVar5") (- "-") (number_literal "0x41"))) () ")")) (compound_statement "{\n      uVar2 = param_1 & 0xffffffff;\n    }" ({ "{") (expression_statement "uVar2 = param_1 & 0xffffffff;" (assignment_expression "uVar2 = param_1 & 0xffffffff" (identifier "uVar2") (= "=") (binary_expression "param_1 & 0xffffffff" (identifier "param_1") (& "&") (number_literal "0xffffffff"))) (; ";")) (} "}"))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (if_statement "if (0xffff < (int)uVar5) {\n    uVar2 = (ulong)(uVar5 + 0x28);\n    if (0x27 < uVar5 - 0x10400) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(0xffff < (int)uVar5)" (( "(") (binary_expression "0xffff < (int)uVar5" (number_literal "0xffff") (< "<") (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5"))) () ")")) (compound_statement "{\n    uVar2 = (ulong)(uVar5 + 0x28);\n    if (0x27 < uVar5 - 0x10400) {\n      uVar2 = param_1 & 0xffffffff;\n    }\n    return uVar2;\n  }" ({ "{") (expression_statement "uVar2 = (ulong)(uVar5 + 0x28);" (assignment_expression "uVar2 = (ulong)(uVar5 + 0x28)" (identifier "uVar2") (= "=") (call_expression "(ulong)(uVar5 + 0x28)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(uVar5 + 0x28)" (( "(") (binary_expression "uVar5 + 0x28" (identifier "uVar5") (+ "+") (number_literal "0x28")) () ")")))) (; ";")) (if_statement "if (0x27 < uVar5 - 0x10400) {\n      uVar2 = param_1 & 0xffffffff;\n    }" (if "if") (parenthesized_expression "(0x27 < uVar5 - 0x10400)" (( "(") (binary_expression "0x27 < uVar5 - 0x10400" (number_literal "0x27") (< "<") (binary_expression "uVar5 - 0x10400" (identifier "uVar5") (- "-") (number_literal "0x10400"))) () ")")) (compound_statement "{\n      uVar2 = param_1 & 0xffffffff;\n    }" ({ "{") (expression_statement "uVar2 = param_1 & 0xffffffff;" (assignment_expression "uVar2 = param_1 & 0xffffffff" (identifier "uVar2") (= "=") (binary_expression "param_1 & 0xffffffff" (identifier "param_1") (& "&") (number_literal "0xffffffff"))) (; ";")) (} "}"))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (expression_statement "uVar4 = 0x3f1;" (assignment_expression "uVar4 = 0x3f1" (identifier "uVar4") (= "=") (number_literal "0x3f1")) (; ";")) (expression_statement "lVar7 = -1;" (assignment_expression "lVar7 = -1" (identifier "lVar7") (= "=") (number_literal "-1")) (; ";")) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar6 = 0xa2;" (assignment_expression "iVar6 = 0xa2" (identifier "iVar6") (= "=") (number_literal "0xa2")) (; ";")) (expression_statement "iVar1 = 0xa2;" (assignment_expression "iVar1 = 0xa2" (identifier "iVar1") (= "=") (number_literal "0xa2")) (; ";")) (do_statement "do {\n    iVar1 = iVar1 >> 1;\n    if ((int)(uVar5 - uVar4) < 0) {\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar6;\n    uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);\n  } while( true );" (do "do") (compound_statement "{\n    iVar1 = iVar1 >> 1;\n    if ((int)(uVar5 - uVar4) < 0) {\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }\n    iVar1 = iVar3 + iVar6;\n    uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);\n  }" ({ "{") (expression_statement "iVar1 = iVar1 >> 1;" (assignment_expression "iVar1 = iVar1 >> 1" (identifier "iVar1") (= "=") (binary_expression "iVar1 >> 1" (identifier "iVar1") (>> ">>") (number_literal "1"))) (; ";")) (if_statement "if ((int)(uVar5 - uVar4) < 0) {\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }\n    else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }" (if "if") (parenthesized_expression "((int)(uVar5 - uVar4) < 0)" (( "(") (binary_expression "(int)(uVar5 - uVar4) < 0" (cast_expression "(int)(uVar5 - uVar4)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(uVar5 - uVar4)" (( "(") (binary_expression "uVar5 - uVar4" (identifier "uVar5") (- "-") (identifier "uVar4")) () ")"))) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      iVar6 = iVar1 + -1;\n      if (iVar6 < iVar3) goto LAB_0012795a;\n    }" ({ "{") (expression_statement "iVar6 = iVar1 + -1;" (assignment_expression "iVar6 = iVar1 + -1" (identifier "iVar6") (= "=") (binary_expression "iVar1 + -1" (identifier "iVar1") (+ "+") (number_literal "-1"))) (; ";")) (if_statement "if (iVar6 < iVar3) goto LAB_0012795a;" (if "if") (parenthesized_expression "(iVar6 < iVar3)" (( "(") (binary_expression "iVar6 < iVar3" (identifier "iVar6") (< "<") (identifier "iVar3")) () ")")) (goto_statement "goto LAB_0012795a;" (goto "goto") (statement_identifier "LAB_0012795a") (; ";"))) (} "}")) (else_clause "else {\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }" (else "else") (compound_statement "{\n      iVar3 = iVar1 + 1;\n      lVar7 = (long)iVar1;\n      if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }\n    }" ({ "{") (expression_statement "iVar3 = iVar1 + 1;" (assignment_expression "iVar3 = iVar1 + 1" (identifier "iVar3") (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "lVar7 = (long)iVar1;" (assignment_expression "lVar7 = (long)iVar1" (identifier "lVar7") (= "=") (cast_expression "(long)iVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar1"))) (; ";")) (if_statement "if (iVar6 < iVar3) {\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }" (if "if") (parenthesized_expression "(iVar6 < iVar3)" (( "(") (binary_expression "iVar6 < iVar3" (identifier "iVar6") (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\nLAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }\n        if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }\n        uVar2 = FUN_00114260(param_1,param_2 == 2);\n        return uVar2;\n      }" ({ "{") (labeled_statement "LAB_0012795a:\n        if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }" (statement_identifier "LAB_0012795a") (: ":") (if_statement "if ((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }" (if "if") (parenthesized_expression "((int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4)))" (( "(") (binary_expression "(int)uVar5 <\n            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))" (cast_expression "(int)uVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar5")) (< "<") (cast_expression "(int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))" (( "(") (binary_expression "(uint)(byte)(&UNK_001ef563)[lVar7 * 4] +\n                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4)" (subscript_expression "(uint)(byte)(&UNK_001ef563)[lVar7 * 4]" (call_expression "(uint)(byte)(&UNK_001ef563)" (call_expression "(uint)(byte)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(byte)" (( "(") (identifier "byte") () ")"))) (argument_list "(&UNK_001ef563)" (( "(") (pointer_expression "&UNK_001ef563" (& "&") (identifier "UNK_001ef563")) () ")"))) ([ "[") (binary_expression "lVar7 * 4" (identifier "lVar7") (* "*") (number_literal "4")) (] "]")) (+ "+") (binary_expression "(uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(ushort *)(&DAT_001ef560 + lVar7 * 4)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(&DAT_001ef560 + lVar7 * 4)" (( "(") (binary_expression "&DAT_001ef560 + lVar7 * 4" (pointer_expression "&DAT_001ef560" (& "&") (identifier "DAT_001ef560")) (+ "+") (binary_expression "lVar7 * 4" (identifier "lVar7") (* "*") (number_literal "4"))) () ")"))))) () ")")))) () ")")) (compound_statement "{\n          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }\n        }" ({ "{") (if_statement "if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }" (if "if") (parenthesized_expression "(((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0)" (( "(") (binary_expression "((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0" (parenthesized_expression "((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5))" (( "(") (binary_expression "(byte)(&UNK_001ef562)[lVar7 * 4] & 1 &\n              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)" (binary_expression "(byte)(&UNK_001ef562)[lVar7 * 4] & 1" (subscript_expression "(byte)(&UNK_001ef562)[lVar7 * 4]" (call_expression "(byte)(&UNK_001ef562)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(&UNK_001ef562)" (( "(") (pointer_expression "&UNK_001ef562" (& "&") (identifier "UNK_001ef562")) () ")"))) ([ "[") (binary_expression "lVar7 * 4" (identifier "lVar7") (* "*") (number_literal "4")) (] "]")) (& "&") (number_literal "1")) (& "&") (parenthesized_expression "(*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)" (( "(") (binary_expression "*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5" (pointer_expression "*(ushort *)(&DAT_001ef560 + lVar7 * 4)" (* "*") (cast_expression "(ushort *)(&DAT_001ef560 + lVar7 * 4)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(&DAT_001ef560 + lVar7 * 4)" (( "(") (binary_expression "&DAT_001ef560 + lVar7 * 4" (pointer_expression "&DAT_001ef560" (& "&") (identifier "DAT_001ef560")) (+ "+") (binary_expression "lVar7 * 4" (identifier "lVar7") (* "*") (number_literal "4"))) () ")")))) (^ "^") (identifier "uVar5")) () ")"))) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n            param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));\n          }" ({ "{") (expression_statement "param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));" (assignment_expression "param_1 = (ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2))" (identifier "param_1") (= "=") (call_expression "(ulong)(ushort)((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2))" (call_expression "(ulong)(ushort)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(ushort)" (( "(") (identifier "ushort") () ")"))) (argument_list "((short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2))" (( "(") (binary_expression "(short)param_1 +\n                                     *(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2)" (cast_expression "(short)param_1" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (identifier "param_1")) (+ "+") (pointer_expression "*(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2)" (* "*") (cast_expression "(short *)(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2)" (( "(") (binary_expression "&DAT_001ef180 +\n                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2" (pointer_expression "&DAT_001ef180" (& "&") (identifier "DAT_001ef180")) (+ "+") (binary_expression "(ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2" (call_expression "(ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "((byte)(&UNK_001ef562)[lVar7 * 4] >> 1)" (( "(") (binary_expression "(byte)(&UNK_001ef562)[lVar7 * 4] >> 1" (subscript_expression "(byte)(&UNK_001ef562)[lVar7 * 4]" (call_expression "(byte)(&UNK_001ef562)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(&UNK_001ef562)" (( "(") (pointer_expression "&UNK_001ef562" (& "&") (identifier "UNK_001ef562")) () ")"))) ([ "[") (binary_expression "lVar7 * 4" (identifier "lVar7") (* "*") (number_literal "4")) (] "]")) (>> ">>") (number_literal "1")) () ")"))) (* "*") (number_literal "2"))) () ")"))))) () ")")))) (; ";")) (} "}"))) (} "}")))) (if_statement "if (param_2 == 0) {\n          return param_1 & 0xffffffff;\n        }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          return param_1 & 0xffffffff;\n        }" ({ "{") (return_statement "return param_1 & 0xffffffff;" (return "return") (binary_expression "param_1 & 0xffffffff" (identifier "param_1") (& "&") (number_literal "0xffffffff")) (; ";")) (} "}"))) (expression_statement "uVar2 = FUN_00114260(param_1,param_2 == 2);" (assignment_expression "uVar2 = FUN_00114260(param_1,param_2 == 2)" (identifier "uVar2") (= "=") (call_expression "FUN_00114260(param_1,param_2 == 2)" (identifier "FUN_00114260") (argument_list "(param_1,param_2 == 2)" (( "(") (identifier "param_1") (, ",") (binary_expression "param_2 == 2" (identifier "param_2") (== "==") (number_literal "2")) () ")")))) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (} "}")))) (expression_statement "iVar1 = iVar3 + iVar6;" (assignment_expression "iVar1 = iVar3 + iVar6" (identifier "iVar1") (= "=") (binary_expression "iVar3 + iVar6" (identifier "iVar3") (+ "+") (identifier "iVar6"))) (; ";")) (expression_statement "uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);" (assignment_expression "uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4)" (identifier "uVar4") (= "=") (binary_expression "(uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(&DAT_001ef560 + (long)(iVar1 >> 1) * 4)" (( "(") (binary_expression "&DAT_001ef560 + (long)(iVar1 >> 1) * 4" (pointer_expression "&DAT_001ef560" (& "&") (identifier "DAT_001ef560")) (+ "+") (binary_expression "(long)(iVar1 >> 1) * 4" (cast_expression "(long)(iVar1 >> 1)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(iVar1 >> 1)" (( "(") (binary_expression "iVar1 >> 1" (identifier "iVar1") (>> ">>") (number_literal "1")) () ")"))) (* "*") (number_literal "4"))) () ")"))))) (; ";")) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}")))

int function_1(int var_1,int var_9)

{
  int var_2;
  int var_4;
  int var_5;
  type_1 var_3;
  int ret;
  long var_6;
  
  if (var_1 < 0x80) {
    var_4 = var_1 + 0x20;
    if (0x19 < var_1 - 0x41U) {
      var_4 = var_1;
    }
    return var_4;
  }
  if (0xffff < var_1) {
    var_4 = var_1 + 0x28;
    if (0x27 < var_1 - 0x10400U) {
      var_4 = var_1;
    }
    return var_4;
  }
  var_3 = 0x3f1;
  var_6 = -1;
  var_5 = 0;
  var_4 = 0xa2;
  var_2 = 0xa2;
  do {
    var_2 = var_2 >> 1;
    if ((int)(var_1 - var_3) < 0) {
      var_4 = var_2 + -1;
      if (var_4 < var_5) goto LAB_0012795a;
    }
    else {
      var_5 = var_2 + 1;
      var_6 = (long)var_2;
      if (var_4 < var_5) {
LAB_0012795a:
        if ((var_1 < (int)((type_1)(type_2)var_7[var_6 * 4 + 3] +
                      (type_1)*(type_3 *)(var_7 + var_6 * 4))) &&
           (((type_2)var_7[var_6 * 4 + 2] & 1 &
            ((type_1)*(type_3 *)(var_7 + var_6 * 4) ^ var_1)) == 0)) {
          var_1 = (int)(type_3)((short)var_1 +
                           *(short *)(var_8 +
                                     (ulong)((type_2)var_7[var_6 * 4 + 2] >> 1) * 2));
        }
        if (var_9 == 0) {
          return var_1;
        }
        var_4 = var_10(var_1,(type_1)(var_9 == 2));
        return var_4;
      }
    }
    var_2 = var_5 + var_4;
    var_3 = (type_1)*(type_3 *)(var_7 + (long)(var_2 >> 1) * 4);
  } while( true );
}


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

ulong MASKED(ulong param_1,int param_2)

{
  int iVar1;
  ulong uVar2;
  int iVar3;
  uint uVar4;
  uint uVar5;
  int iVar6;
  long lVar7;
  
  uVar5 = (uint)param_1;
  if ((int)uVar5 < 0x80) {
    uVar2 = (ulong)(uVar5 + 0x20);
    if (0x19 < uVar5 - 0x41) {
      uVar2 = param_1 & 0xffffffff;
    }
    return uVar2;
  }
  if (0xffff < (int)uVar5) {
    uVar2 = (ulong)(uVar5 + 0x28);
    if (0x27 < uVar5 - 0x10400) {
      uVar2 = param_1 & 0xffffffff;
    }
    return uVar2;
  }
  uVar4 = 0x3f1;
  lVar7 = -1;
  iVar3 = 0;
  iVar6 = 0xa2;
  iVar1 = 0xa2;
  do {
    iVar1 = iVar1 >> 1;
    if ((int)(uVar5 - uVar4) < 0) {
      iVar6 = iVar1 + -1;
      if (iVar6 < iVar3) goto LAB_0012795a;
    }
    else {
      iVar3 = iVar1 + 1;
      lVar7 = (long)iVar1;
      if (iVar6 < iVar3) {
LAB_0012795a:
        if ((int)uVar5 <
            (int)((uint)(byte)(&UNK_001ef563)[lVar7 * 4] +
                 (uint)*(ushort *)(&DAT_001ef560 + lVar7 * 4))) {
          if (((byte)(&UNK_001ef562)[lVar7 * 4] & 1 &
              (*(ushort *)(&DAT_001ef560 + lVar7 * 4) ^ uVar5)) == 0) {
            param_1 = (ulong)(ushort)((short)param_1 +
                                     *(short *)(&DAT_001ef180 +
                                               (ulong)((byte)(&UNK_001ef562)[lVar7 * 4] >> 1) * 2));
          }
        }
        if (param_2 == 0) {
          return param_1 & 0xffffffff;
        }
        uVar2 = FUN_00114260(param_1,param_2 == 2);
        return uVar2;
      }
    }
    iVar1 = iVar3 + iVar6;
    uVar4 = (uint)*(ushort *)(&DAT_001ef560 + (long)(iVar1 >> 1) * 4);
  } while( true );
}

