
int fts5MultiIterAdvanceRowid(Fts5Iter *pIter,int iChanged,Fts5SegIter **ppFirst)

{
  long lVar1;
  i64 iVar2;
  Fts5SegIter *pFVar3;
  uint uVar4;
  Fts5CResult *pFVar5;
  Fts5SegIter *pFVar6;
  
  pFVar3 = pIter->aSeg + iChanged;
  lVar1 = pIter->aSeg[iChanged].iRowid;
  if ((lVar1 == pIter->iSwitchRowid) || ((uint)(lVar1 < pIter->iSwitchRowid) == pIter->bRev)) {
    pFVar5 = pIter->aFirst;
    iVar2 = -0x8000000000000000;
    pFVar6 = pIter->aSeg + (int)(iChanged ^ 1);
    if (pIter->bRev == 0) {
      iVar2 = 0x7fffffffffffffff;
    }
    uVar4 = iChanged + pIter->nSeg;
    pIter->iSwitchRowid = iVar2;
    while( true ) {
      uVar4 = (int)uVar4 / 2;
      if (pFVar5[(int)uVar4].bTermEq != '\0') {
        lVar1 = pFVar6->iRowid;
        if (pFVar3->iRowid == lVar1) {
          return 1;
        }
        if ((uint)(pFVar3->iRowid < lVar1) == pIter->bRev) {
          pIter->iSwitchRowid = lVar1;
          pFVar3 = pFVar6;
        }
        else if (pIter->bRev == (uint)(pIter->iSwitchRowid < lVar1)) {
          pIter->iSwitchRowid = lVar1;
        }
      }
      pFVar5[(int)uVar4].iFirst = (short)((long)pFVar3 - (long)pIter->aSeg >> 3) * -0x1111;
      if (uVar4 == 1) break;
      pFVar5 = pIter->aFirst;
      pFVar6 = pIter->aSeg + pFVar5[(int)(uVar4 ^ 1)].iFirst;
    }
  }
  *ppFirst = pFVar3;
  return 0;
}



undefined8 FUN_00115110(long param_1,uint param_2,long *param_3)

{
  short *psVar1;
  undefined8 uVar2;
  long lVar3;
  long lVar4;
  long lVar5;
  
  lVar3 = param_1 + 0x60 + (long)(int)param_2 * 0x78;
  lVar5 = *(long *)(param_1 + 200 + (long)(int)param_2 * 0x78);
  if ((lVar5 == *(long *)(param_1 + 0x50)) ||
     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))) {
    lVar4 = *(long *)(param_1 + 0x58);
    uVar2 = 0x8000000000000000;
    lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;
    if (*(uint *)(param_1 + 0x44) == 0) {
      uVar2 = 0x7fffffffffffffff;
    }
    param_2 = param_2 + *(int *)(param_1 + 0x40);
    *(undefined8 *)(param_1 + 0x50) = uVar2;
    while( true ) {
      param_2 = (int)param_2 / 2;
      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);
      if ((char)psVar1[1] != '\0') {
        lVar4 = *(long *)(lVar5 + 0x68);
        if (*(long *)(lVar3 + 0x68) == lVar4) {
          return 1;
        }
        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {
          *(long *)(param_1 + 0x50) = lVar4;
          lVar3 = lVar5;
        }
        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {
          *(long *)(param_1 + 0x50) = lVar4;
        }
      }
      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;
      if (param_2 == 1) break;
      lVar4 = *(long *)(param_1 + 0x58);
      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;
    }
  }
  *param_3 = lVar3;
  return 0;
}


MOVSXD RCX,ESI
PUSH RBP
MOV R9D,dword ptr [RDI + 0x44]
MOV RAX,RCX
PUSH RBX
MOV RBX,qword ptr [RDI + 0x50]
SHL RAX,0x4
SUB RAX,RCX
SHL RAX,0x3
LEA RCX,[RDI + RAX*0x1 + 0x60]
CMP qword ptr [RDI + RAX*0x1 + 0xc8],RBX
JZ 0x00115150
SETL AL
MOVZX EAX,AL
CMP EAX,R9D
JZ 0x00115150
XOR EAX,EAX
POP RBX
POP RBP
MOV qword ptr [RDX],RCX
RET
MOV EAX,ESI
MOV R10,qword ptr [RDI + 0x58]
XOR EAX,0x1
CDQE
MOV R8,RAX
SHL R8,0x4
SUB R8,RAX
TEST R9D,R9D
LEA R9,[RDI + 0x60]
MOV RAX,-0x8000000000000000
LEA R11,[RDI + R8*0x8 + 0x60]
MOV R8,0x7fffffffffffffff
CMOVZ RAX,R8
ADD ESI,dword ptr [RDI + 0x40]
MOV R8,-0x1111111111111111
MOV qword ptr [RDI + 0x50],RAX
MOV EAX,ESI
SHR EAX,0x1f
ADD ESI,EAX
SAR ESI,0x1
JMP 0x00115203
XOR R11D,R11D
CMP RAX,qword ptr [RDI + 0x50]
SETG R11B
CMP EBX,R11D
JNZ 0x001151c0
MOV qword ptr [RDI + 0x50],RAX
NOP dword ptr [RAX]
MOV RAX,RCX
SUB RAX,R9
SAR RAX,0x3
IMUL RAX,R8
MOV word ptr [R10],AX
CMP ESI,0x1
JZ 0x00115145
MOV EAX,ESI
MOV R10,qword ptr [RDI + 0x58]
XOR EAX,0x1
CDQE
MOVZX R11D,word ptr [R10 + RAX*0x4]
MOV RAX,R11
SHL RAX,0x4
SUB RAX,R11
LEA R11,[RDI + RAX*0x8 + 0x60]
MOV EAX,ESI
SHR EAX,0x1f
ADD ESI,EAX
SAR ESI,0x1
MOVSXD RAX,ESI
LEA R10,[R10 + RAX*0x4]
CMP byte ptr [R10 + 0x2],0x0
JZ 0x001151c0
MOV RAX,qword ptr [R11 + 0x68]
CMP qword ptr [RCX + 0x68],RAX
JZ 0x00115240
SETL BPL
MOV EBX,dword ptr [RDI + 0x44]
MOVZX EBP,BPL
CMP EBP,EBX
JNZ 0x001151a8
MOV qword ptr [RDI + 0x50],RAX
MOV RCX,R11
JMP 0x001151c0
MOV EAX,0x1
POP RBX
POP RBP
RET
(translation_unit "undefined8 FUN_00115110(long param_1,uint param_2,long *param_3)\n\n{\n  short *psVar1;\n  undefined8 uVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  lVar3 = param_1 + 0x60 + (long)(int)param_2 * 0x78;\n  lVar5 = *(long *)(param_1 + 200 + (long)(int)param_2 * 0x78);\n  if ((lVar5 == *(long *)(param_1 + 0x50)) ||\n     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))) {\n    lVar4 = *(long *)(param_1 + 0x58);\n    uVar2 = 0x8000000000000000;\n    lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;\n    if (*(uint *)(param_1 + 0x44) == 0) {\n      uVar2 = 0x7fffffffffffffff;\n    }\n    param_2 = param_2 + *(int *)(param_1 + 0x40);\n    *(undefined8 *)(param_1 + 0x50) = uVar2;\n    while( true ) {\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }\n  }\n  *param_3 = lVar3;\n  return 0;\n}\n\n" (function_definition "undefined8 FUN_00115110(long param_1,uint param_2,long *param_3)\n\n{\n  short *psVar1;\n  undefined8 uVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  lVar3 = param_1 + 0x60 + (long)(int)param_2 * 0x78;\n  lVar5 = *(long *)(param_1 + 200 + (long)(int)param_2 * 0x78);\n  if ((lVar5 == *(long *)(param_1 + 0x50)) ||\n     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))) {\n    lVar4 = *(long *)(param_1 + 0x58);\n    uVar2 = 0x8000000000000000;\n    lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;\n    if (*(uint *)(param_1 + 0x44) == 0) {\n      uVar2 = 0x7fffffffffffffff;\n    }\n    param_2 = param_2 + *(int *)(param_1 + 0x40);\n    *(undefined8 *)(param_1 + 0x50) = uVar2;\n    while( true ) {\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }\n  }\n  *param_3 = lVar3;\n  return 0;\n}" type_identifier (function_declarator "FUN_00115110(long param_1,uint param_2,long *param_3)" identifier (parameter_list "(long param_1,uint param_2,long *param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "long *param_3" (sized_type_specifier "long" long) (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  short *psVar1;\n  undefined8 uVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  lVar3 = param_1 + 0x60 + (long)(int)param_2 * 0x78;\n  lVar5 = *(long *)(param_1 + 200 + (long)(int)param_2 * 0x78);\n  if ((lVar5 == *(long *)(param_1 + 0x50)) ||\n     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))) {\n    lVar4 = *(long *)(param_1 + 0x58);\n    uVar2 = 0x8000000000000000;\n    lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;\n    if (*(uint *)(param_1 + 0x44) == 0) {\n      uVar2 = 0x7fffffffffffffff;\n    }\n    param_2 = param_2 + *(int *)(param_1 + 0x40);\n    *(undefined8 *)(param_1 + 0x50) = uVar2;\n    while( true ) {\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }\n  }\n  *param_3 = lVar3;\n  return 0;\n}" { (declaration "short *psVar1;" (sized_type_specifier "short" short) (pointer_declarator "*psVar1" * identifier) ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (expression_statement "lVar3 = param_1 + 0x60 + (long)(int)param_2 * 0x78;" (assignment_expression "lVar3 = param_1 + 0x60 + (long)(int)param_2 * 0x78" identifier = (binary_expression "param_1 + 0x60 + (long)(int)param_2 * 0x78" (binary_expression "param_1 + 0x60" identifier + number_literal) + (binary_expression "(long)(int)param_2 * 0x78" (cast_expression "(long)(int)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) * number_literal))) ;) (expression_statement "lVar5 = *(long *)(param_1 + 200 + (long)(int)param_2 * 0x78);" (assignment_expression "lVar5 = *(long *)(param_1 + 200 + (long)(int)param_2 * 0x78)" identifier = (pointer_expression "*(long *)(param_1 + 200 + (long)(int)param_2 * 0x78)" * (cast_expression "(long *)(param_1 + 200 + (long)(int)param_2 * 0x78)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 200 + (long)(int)param_2 * 0x78)" ( (binary_expression "param_1 + 200 + (long)(int)param_2 * 0x78" (binary_expression "param_1 + 200" identifier + number_literal) + (binary_expression "(long)(int)param_2 * 0x78" (cast_expression "(long)(int)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) * number_literal)) ))))) ;) (if_statement "if ((lVar5 == *(long *)(param_1 + 0x50)) ||\n     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))) {\n    lVar4 = *(long *)(param_1 + 0x58);\n    uVar2 = 0x8000000000000000;\n    lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;\n    if (*(uint *)(param_1 + 0x44) == 0) {\n      uVar2 = 0x7fffffffffffffff;\n    }\n    param_2 = param_2 + *(int *)(param_1 + 0x40);\n    *(undefined8 *)(param_1 + 0x50) = uVar2;\n    while( true ) {\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }\n  }" if (parenthesized_expression "((lVar5 == *(long *)(param_1 + 0x50)) ||\n     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44)))" ( (binary_expression "(lVar5 == *(long *)(param_1 + 0x50)) ||\n     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))" (parenthesized_expression "(lVar5 == *(long *)(param_1 + 0x50))" ( (binary_expression "lVar5 == *(long *)(param_1 + 0x50)" identifier == (pointer_expression "*(long *)(param_1 + 0x50)" * (cast_expression "(long *)(param_1 + 0x50)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) ))))) )) || (parenthesized_expression "((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))" ( (binary_expression "(uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44)" (call_expression "(uint)(lVar5 < *(long *)(param_1 + 0x50))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(lVar5 < *(long *)(param_1 + 0x50))" ( (binary_expression "lVar5 < *(long *)(param_1 + 0x50)" identifier < (pointer_expression "*(long *)(param_1 + 0x50)" * (cast_expression "(long *)(param_1 + 0x50)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) ))))) ))) == (pointer_expression "*(uint *)(param_1 + 0x44)" * (cast_expression "(uint *)(param_1 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) ))))) ))) )) (compound_statement "{\n    lVar4 = *(long *)(param_1 + 0x58);\n    uVar2 = 0x8000000000000000;\n    lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;\n    if (*(uint *)(param_1 + 0x44) == 0) {\n      uVar2 = 0x7fffffffffffffff;\n    }\n    param_2 = param_2 + *(int *)(param_1 + 0x40);\n    *(undefined8 *)(param_1 + 0x50) = uVar2;\n    while( true ) {\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }\n  }" { (expression_statement "lVar4 = *(long *)(param_1 + 0x58);" (assignment_expression "lVar4 = *(long *)(param_1 + 0x58)" identifier = (pointer_expression "*(long *)(param_1 + 0x58)" * (cast_expression "(long *)(param_1 + 0x58)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x58)" ( (binary_expression "param_1 + 0x58" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = 0x8000000000000000;" (assignment_expression "uVar2 = 0x8000000000000000" identifier = number_literal) ;) (expression_statement "lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;" (assignment_expression "lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78" identifier = (binary_expression "param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78" (binary_expression "param_1 + 0x60" identifier + number_literal) + (binary_expression "(long)(int)(param_2 ^ 1) * 0x78" (cast_expression "(long)(int)(param_2 ^ 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(param_2 ^ 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(param_2 ^ 1)" ( (binary_expression "param_2 ^ 1" identifier ^ number_literal) )))) * number_literal))) ;) (if_statement "if (*(uint *)(param_1 + 0x44) == 0) {\n      uVar2 = 0x7fffffffffffffff;\n    }" if (parenthesized_expression "(*(uint *)(param_1 + 0x44) == 0)" ( (binary_expression "*(uint *)(param_1 + 0x44) == 0" (pointer_expression "*(uint *)(param_1 + 0x44)" * (cast_expression "(uint *)(param_1 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      uVar2 = 0x7fffffffffffffff;\n    }" { (expression_statement "uVar2 = 0x7fffffffffffffff;" (assignment_expression "uVar2 = 0x7fffffffffffffff" identifier = number_literal) ;) })) (expression_statement "param_2 = param_2 + *(int *)(param_1 + 0x40);" (assignment_expression "param_2 = param_2 + *(int *)(param_1 + 0x40)" identifier = (binary_expression "param_2 + *(int *)(param_1 + 0x40)" identifier + (pointer_expression "*(int *)(param_1 + 0x40)" * (cast_expression "(int *)(param_1 + 0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))))) ;) (expression_statement "*(undefined8 *)(param_1 + 0x50) = uVar2;" (assignment_expression "*(undefined8 *)(param_1 + 0x50) = uVar2" (pointer_expression "*(undefined8 *)(param_1 + 0x50)" * (cast_expression "(undefined8 *)(param_1 + 0x50)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) = identifier) ;) (while_statement "while( true ) {\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }" { (expression_statement "param_2 = (int)param_2 / 2;" (assignment_expression "param_2 = (int)param_2 / 2" identifier = (binary_expression "(int)param_2 / 2" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) / number_literal)) ;) (expression_statement "psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);" (assignment_expression "psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4)" identifier = (cast_expression "(short *)(lVar4 + (long)(int)param_2 * 4)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar4 + (long)(int)param_2 * 4)" ( (binary_expression "lVar4 + (long)(int)param_2 * 4" identifier + (binary_expression "(long)(int)param_2 * 4" (cast_expression "(long)(int)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) * number_literal)) )))) ;) (if_statement "if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }" if (parenthesized_expression "((char)psVar1[1] != '\0')" ( (binary_expression "(char)psVar1[1] != '\0'" (cast_expression "(char)psVar1[1]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "psVar1[1]" identifier [ number_literal ])) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }" { (expression_statement "lVar4 = *(long *)(lVar5 + 0x68);" (assignment_expression "lVar4 = *(long *)(lVar5 + 0x68)" identifier = (pointer_expression "*(long *)(lVar5 + 0x68)" * (cast_expression "(long *)(lVar5 + 0x68)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + 0x68)" ( (binary_expression "lVar5 + 0x68" identifier + number_literal) ))))) ;) (if_statement "if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }" if (parenthesized_expression "(*(long *)(lVar3 + 0x68) == lVar4)" ( (binary_expression "*(long *)(lVar3 + 0x68) == lVar4" (pointer_expression "*(long *)(lVar3 + 0x68)" * (cast_expression "(long *)(lVar3 + 0x68)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x68)" ( (binary_expression "lVar3 + 0x68" identifier + number_literal) )))) == identifier) )) (compound_statement "{\n          return 1;\n        }" { (return_statement "return 1;" return number_literal ;) })) (if_statement "if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }" if (parenthesized_expression "((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44))" ( (binary_expression "(uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)" (call_expression "(uint)(*(long *)(lVar3 + 0x68) < lVar4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*(long *)(lVar3 + 0x68) < lVar4)" ( (binary_expression "*(long *)(lVar3 + 0x68) < lVar4" (pointer_expression "*(long *)(lVar3 + 0x68)" * (cast_expression "(long *)(lVar3 + 0x68)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x68)" ( (binary_expression "lVar3 + 0x68" identifier + number_literal) )))) < identifier) ))) == (pointer_expression "*(uint *)(param_1 + 0x44)" * (cast_expression "(uint *)(param_1 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) ))))) )) (compound_statement "{\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }" { (expression_statement "*(long *)(param_1 + 0x50) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x50) = lVar4" (pointer_expression "*(long *)(param_1 + 0x50)" * (cast_expression "(long *)(param_1 + 0x50)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) = identifier) ;) (expression_statement "lVar3 = lVar5;" (assignment_expression "lVar3 = lVar5" identifier = identifier) ;) }) (else_clause "else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }" else (if_statement "if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }" if (parenthesized_expression "(*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4))" ( (binary_expression "*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)" (pointer_expression "*(uint *)(param_1 + 0x44)" * (cast_expression "(uint *)(param_1 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) == (call_expression "(uint)(*(long *)(param_1 + 0x50) < lVar4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*(long *)(param_1 + 0x50) < lVar4)" ( (binary_expression "*(long *)(param_1 + 0x50) < lVar4" (pointer_expression "*(long *)(param_1 + 0x50)" * (cast_expression "(long *)(param_1 + 0x50)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) < identifier) )))) )) (compound_statement "{\n          *(long *)(param_1 + 0x50) = lVar4;\n        }" { (expression_statement "*(long *)(param_1 + 0x50) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x50) = lVar4" (pointer_expression "*(long *)(param_1 + 0x50)" * (cast_expression "(long *)(param_1 + 0x50)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) = identifier) ;) })))) })) (expression_statement "*psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;" (assignment_expression "*psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111" (pointer_expression "*psVar1" * identifier) = (binary_expression "(short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111" (cast_expression "(short)(lVar3 - (param_1 + 0x60) >> 3)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "(lVar3 - (param_1 + 0x60) >> 3)" ( (binary_expression "lVar3 - (param_1 + 0x60) >> 3" (binary_expression "lVar3 - (param_1 + 0x60)" identifier - (parenthesized_expression "(param_1 + 0x60)" ( (binary_expression "param_1 + 0x60" identifier + number_literal) ))) >> number_literal) ))) * number_literal)) ;) (if_statement "if (param_2 == 1) break;" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar4 = *(long *)(param_1 + 0x58);" (assignment_expression "lVar4 = *(long *)(param_1 + 0x58)" identifier = (pointer_expression "*(long *)(param_1 + 0x58)" * (cast_expression "(long *)(param_1 + 0x58)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x58)" ( (binary_expression "param_1 + 0x58" identifier + number_literal) ))))) ;) (expression_statement "lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;" (assignment_expression "lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78" identifier = (binary_expression "param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78" (binary_expression "param_1 + 0x60" identifier + number_literal) + (binary_expression "(ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78" (binary_expression "(ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4)" (parenthesized_expression "(ulong)" ( identifier )) * (cast_expression "(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar4 + (long)(int)(param_2 ^ 1) * 4)" ( (binary_expression "lVar4 + (long)(int)(param_2 ^ 1) * 4" identifier + (binary_expression "(long)(int)(param_2 ^ 1) * 4" (cast_expression "(long)(int)(param_2 ^ 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(param_2 ^ 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(param_2 ^ 1)" ( (binary_expression "param_2 ^ 1" identifier ^ number_literal) )))) * number_literal)) )))) * number_literal))) ;) })) })) (expression_statement "*param_3 = lVar3;" (assignment_expression "*param_3 = lVar3" (pointer_expression "*param_3" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int fts5MultiIterAdvanceRowid(Fts5Iter *pIter,int iChanged,Fts5SegIter **ppFirst)\n\n{\n  long lVar1;\n  i64 iVar2;\n  Fts5SegIter *pFVar3;\n  uint uVar4;\n  Fts5CResult *pFVar5;\n  Fts5SegIter *pFVar6;\n  \n  pFVar3 = pIter->aSeg + iChanged;\n  lVar1 = pIter->aSeg[iChanged].iRowid;\n  if ((lVar1 == pIter->iSwitchRowid) || ((uint)(lVar1 < pIter->iSwitchRowid) == pIter->bRev)) {\n    pFVar5 = pIter->aFirst;\n    iVar2 = -0x8000000000000000;\n    pFVar6 = pIter->aSeg + (int)(iChanged ^ 1);\n    if (pIter->bRev == 0) {\n      iVar2 = 0x7fffffffffffffff;\n    }\n    uVar4 = iChanged + pIter->nSeg;\n    pIter->iSwitchRowid = iVar2;\n    while( true ) {\n      uVar4 = (int)uVar4 / 2;\n      if (pFVar5[(int)uVar4].bTermEq != '\0') {\n        lVar1 = pFVar6->iRowid;\n        if (pFVar3->iRowid == lVar1) {\n          return 1;\n        }\n        if ((uint)(pFVar3->iRowid < lVar1) == pIter->bRev) {\n          pIter->iSwitchRowid = lVar1;\n          pFVar3 = pFVar6;\n        }\n        else if (pIter->bRev == (uint)(pIter->iSwitchRowid < lVar1)) {\n          pIter->iSwitchRowid = lVar1;\n        }\n      }\n      pFVar5[(int)uVar4].iFirst = (short)((long)pFVar3 - (long)pIter->aSeg >> 3) * -0x1111;\n      if (uVar4 == 1) break;\n      pFVar5 = pIter->aFirst;\n      pFVar6 = pIter->aSeg + pFVar5[(int)(uVar4 ^ 1)].iFirst;\n    }\n  }\n  *ppFirst = pFVar3;\n  return 0;\n}\n\n" (function_definition "int fts5MultiIterAdvanceRowid(Fts5Iter *pIter,int iChanged,Fts5SegIter **ppFirst)\n\n{\n  long lVar1;\n  i64 iVar2;\n  Fts5SegIter *pFVar3;\n  uint uVar4;\n  Fts5CResult *pFVar5;\n  Fts5SegIter *pFVar6;\n  \n  pFVar3 = pIter->aSeg + iChanged;\n  lVar1 = pIter->aSeg[iChanged].iRowid;\n  if ((lVar1 == pIter->iSwitchRowid) || ((uint)(lVar1 < pIter->iSwitchRowid) == pIter->bRev)) {\n    pFVar5 = pIter->aFirst;\n    iVar2 = -0x8000000000000000;\n    pFVar6 = pIter->aSeg + (int)(iChanged ^ 1);\n    if (pIter->bRev == 0) {\n      iVar2 = 0x7fffffffffffffff;\n    }\n    uVar4 = iChanged + pIter->nSeg;\n    pIter->iSwitchRowid = iVar2;\n    while( true ) {\n      uVar4 = (int)uVar4 / 2;\n      if (pFVar5[(int)uVar4].bTermEq != '\0') {\n        lVar1 = pFVar6->iRowid;\n        if (pFVar3->iRowid == lVar1) {\n          return 1;\n        }\n        if ((uint)(pFVar3->iRowid < lVar1) == pIter->bRev) {\n          pIter->iSwitchRowid = lVar1;\n          pFVar3 = pFVar6;\n        }\n        else if (pIter->bRev == (uint)(pIter->iSwitchRowid < lVar1)) {\n          pIter->iSwitchRowid = lVar1;\n        }\n      }\n      pFVar5[(int)uVar4].iFirst = (short)((long)pFVar3 - (long)pIter->aSeg >> 3) * -0x1111;\n      if (uVar4 == 1) break;\n      pFVar5 = pIter->aFirst;\n      pFVar6 = pIter->aSeg + pFVar5[(int)(uVar4 ^ 1)].iFirst;\n    }\n  }\n  *ppFirst = pFVar3;\n  return 0;\n}" primitive_type (function_declarator "fts5MultiIterAdvanceRowid(Fts5Iter *pIter,int iChanged,Fts5SegIter **ppFirst)" identifier (parameter_list "(Fts5Iter *pIter,int iChanged,Fts5SegIter **ppFirst)" ( (parameter_declaration "Fts5Iter *pIter" type_identifier (pointer_declarator "*pIter" * identifier)) , (parameter_declaration "int iChanged" primitive_type identifier) , (parameter_declaration "Fts5SegIter **ppFirst" type_identifier (pointer_declarator "**ppFirst" * (pointer_declarator "*ppFirst" * identifier))) ))) (compound_statement "{\n  long lVar1;\n  i64 iVar2;\n  Fts5SegIter *pFVar3;\n  uint uVar4;\n  Fts5CResult *pFVar5;\n  Fts5SegIter *pFVar6;\n  \n  pFVar3 = pIter->aSeg + iChanged;\n  lVar1 = pIter->aSeg[iChanged].iRowid;\n  if ((lVar1 == pIter->iSwitchRowid) || ((uint)(lVar1 < pIter->iSwitchRowid) == pIter->bRev)) {\n    pFVar5 = pIter->aFirst;\n    iVar2 = -0x8000000000000000;\n    pFVar6 = pIter->aSeg + (int)(iChanged ^ 1);\n    if (pIter->bRev == 0) {\n      iVar2 = 0x7fffffffffffffff;\n    }\n    uVar4 = iChanged + pIter->nSeg;\n    pIter->iSwitchRowid = iVar2;\n    while( true ) {\n      uVar4 = (int)uVar4 / 2;\n      if (pFVar5[(int)uVar4].bTermEq != '\0') {\n        lVar1 = pFVar6->iRowid;\n        if (pFVar3->iRowid == lVar1) {\n          return 1;\n        }\n        if ((uint)(pFVar3->iRowid < lVar1) == pIter->bRev) {\n          pIter->iSwitchRowid = lVar1;\n          pFVar3 = pFVar6;\n        }\n        else if (pIter->bRev == (uint)(pIter->iSwitchRowid < lVar1)) {\n          pIter->iSwitchRowid = lVar1;\n        }\n      }\n      pFVar5[(int)uVar4].iFirst = (short)((long)pFVar3 - (long)pIter->aSeg >> 3) * -0x1111;\n      if (uVar4 == 1) break;\n      pFVar5 = pIter->aFirst;\n      pFVar6 = pIter->aSeg + pFVar5[(int)(uVar4 ^ 1)].iFirst;\n    }\n  }\n  *ppFirst = pFVar3;\n  return 0;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "i64 iVar2;" type_identifier identifier ;) (declaration "Fts5SegIter *pFVar3;" type_identifier (pointer_declarator "*pFVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "Fts5CResult *pFVar5;" type_identifier (pointer_declarator "*pFVar5" * identifier) ;) (declaration "Fts5SegIter *pFVar6;" type_identifier (pointer_declarator "*pFVar6" * identifier) ;) (expression_statement "pFVar3 = pIter->aSeg + iChanged;" (assignment_expression "pFVar3 = pIter->aSeg + iChanged" identifier = (binary_expression "pIter->aSeg + iChanged" (field_expression "pIter->aSeg" identifier -> field_identifier) + identifier)) ;) (expression_statement "lVar1 = pIter->aSeg[iChanged].iRowid;" (assignment_expression "lVar1 = pIter->aSeg[iChanged].iRowid" identifier = (field_expression "pIter->aSeg[iChanged].iRowid" (subscript_expression "pIter->aSeg[iChanged]" (field_expression "pIter->aSeg" identifier -> field_identifier) [ identifier ]) . field_identifier)) ;) (if_statement "if ((lVar1 == pIter->iSwitchRowid) || ((uint)(lVar1 < pIter->iSwitchRowid) == pIter->bRev)) {\n    pFVar5 = pIter->aFirst;\n    iVar2 = -0x8000000000000000;\n    pFVar6 = pIter->aSeg + (int)(iChanged ^ 1);\n    if (pIter->bRev == 0) {\n      iVar2 = 0x7fffffffffffffff;\n    }\n    uVar4 = iChanged + pIter->nSeg;\n    pIter->iSwitchRowid = iVar2;\n    while( true ) {\n      uVar4 = (int)uVar4 / 2;\n      if (pFVar5[(int)uVar4].bTermEq != '\0') {\n        lVar1 = pFVar6->iRowid;\n        if (pFVar3->iRowid == lVar1) {\n          return 1;\n        }\n        if ((uint)(pFVar3->iRowid < lVar1) == pIter->bRev) {\n          pIter->iSwitchRowid = lVar1;\n          pFVar3 = pFVar6;\n        }\n        else if (pIter->bRev == (uint)(pIter->iSwitchRowid < lVar1)) {\n          pIter->iSwitchRowid = lVar1;\n        }\n      }\n      pFVar5[(int)uVar4].iFirst = (short)((long)pFVar3 - (long)pIter->aSeg >> 3) * -0x1111;\n      if (uVar4 == 1) break;\n      pFVar5 = pIter->aFirst;\n      pFVar6 = pIter->aSeg + pFVar5[(int)(uVar4 ^ 1)].iFirst;\n    }\n  }" if (parenthesized_expression "((lVar1 == pIter->iSwitchRowid) || ((uint)(lVar1 < pIter->iSwitchRowid) == pIter->bRev))" ( (binary_expression "(lVar1 == pIter->iSwitchRowid) || ((uint)(lVar1 < pIter->iSwitchRowid) == pIter->bRev)" (parenthesized_expression "(lVar1 == pIter->iSwitchRowid)" ( (binary_expression "lVar1 == pIter->iSwitchRowid" identifier == (field_expression "pIter->iSwitchRowid" identifier -> field_identifier)) )) || (parenthesized_expression "((uint)(lVar1 < pIter->iSwitchRowid) == pIter->bRev)" ( (binary_expression "(uint)(lVar1 < pIter->iSwitchRowid) == pIter->bRev" (call_expression "(uint)(lVar1 < pIter->iSwitchRowid)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(lVar1 < pIter->iSwitchRowid)" ( (binary_expression "lVar1 < pIter->iSwitchRowid" identifier < (field_expression "pIter->iSwitchRowid" identifier -> field_identifier)) ))) == (field_expression "pIter->bRev" identifier -> field_identifier)) ))) )) (compound_statement "{\n    pFVar5 = pIter->aFirst;\n    iVar2 = -0x8000000000000000;\n    pFVar6 = pIter->aSeg + (int)(iChanged ^ 1);\n    if (pIter->bRev == 0) {\n      iVar2 = 0x7fffffffffffffff;\n    }\n    uVar4 = iChanged + pIter->nSeg;\n    pIter->iSwitchRowid = iVar2;\n    while( true ) {\n      uVar4 = (int)uVar4 / 2;\n      if (pFVar5[(int)uVar4].bTermEq != '\0') {\n        lVar1 = pFVar6->iRowid;\n        if (pFVar3->iRowid == lVar1) {\n          return 1;\n        }\n        if ((uint)(pFVar3->iRowid < lVar1) == pIter->bRev) {\n          pIter->iSwitchRowid = lVar1;\n          pFVar3 = pFVar6;\n        }\n        else if (pIter->bRev == (uint)(pIter->iSwitchRowid < lVar1)) {\n          pIter->iSwitchRowid = lVar1;\n        }\n      }\n      pFVar5[(int)uVar4].iFirst = (short)((long)pFVar3 - (long)pIter->aSeg >> 3) * -0x1111;\n      if (uVar4 == 1) break;\n      pFVar5 = pIter->aFirst;\n      pFVar6 = pIter->aSeg + pFVar5[(int)(uVar4 ^ 1)].iFirst;\n    }\n  }" { (expression_statement "pFVar5 = pIter->aFirst;" (assignment_expression "pFVar5 = pIter->aFirst" identifier = (field_expression "pIter->aFirst" identifier -> field_identifier)) ;) (expression_statement "iVar2 = -0x8000000000000000;" (assignment_expression "iVar2 = -0x8000000000000000" identifier = number_literal) ;) (expression_statement "pFVar6 = pIter->aSeg + (int)(iChanged ^ 1);" (assignment_expression "pFVar6 = pIter->aSeg + (int)(iChanged ^ 1)" identifier = (binary_expression "pIter->aSeg + (int)(iChanged ^ 1)" (field_expression "pIter->aSeg" identifier -> field_identifier) + (cast_expression "(int)(iChanged ^ 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(iChanged ^ 1)" ( (binary_expression "iChanged ^ 1" identifier ^ number_literal) ))))) ;) (if_statement "if (pIter->bRev == 0) {\n      iVar2 = 0x7fffffffffffffff;\n    }" if (parenthesized_expression "(pIter->bRev == 0)" ( (binary_expression "pIter->bRev == 0" (field_expression "pIter->bRev" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n      iVar2 = 0x7fffffffffffffff;\n    }" { (expression_statement "iVar2 = 0x7fffffffffffffff;" (assignment_expression "iVar2 = 0x7fffffffffffffff" identifier = number_literal) ;) })) (expression_statement "uVar4 = iChanged + pIter->nSeg;" (assignment_expression "uVar4 = iChanged + pIter->nSeg" identifier = (binary_expression "iChanged + pIter->nSeg" identifier + (field_expression "pIter->nSeg" identifier -> field_identifier))) ;) (expression_statement "pIter->iSwitchRowid = iVar2;" (assignment_expression "pIter->iSwitchRowid = iVar2" (field_expression "pIter->iSwitchRowid" identifier -> field_identifier) = identifier) ;) (while_statement "while( true ) {\n      uVar4 = (int)uVar4 / 2;\n      if (pFVar5[(int)uVar4].bTermEq != '\0') {\n        lVar1 = pFVar6->iRowid;\n        if (pFVar3->iRowid == lVar1) {\n          return 1;\n        }\n        if ((uint)(pFVar3->iRowid < lVar1) == pIter->bRev) {\n          pIter->iSwitchRowid = lVar1;\n          pFVar3 = pFVar6;\n        }\n        else if (pIter->bRev == (uint)(pIter->iSwitchRowid < lVar1)) {\n          pIter->iSwitchRowid = lVar1;\n        }\n      }\n      pFVar5[(int)uVar4].iFirst = (short)((long)pFVar3 - (long)pIter->aSeg >> 3) * -0x1111;\n      if (uVar4 == 1) break;\n      pFVar5 = pIter->aFirst;\n      pFVar6 = pIter->aSeg + pFVar5[(int)(uVar4 ^ 1)].iFirst;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      uVar4 = (int)uVar4 / 2;\n      if (pFVar5[(int)uVar4].bTermEq != '\0') {\n        lVar1 = pFVar6->iRowid;\n        if (pFVar3->iRowid == lVar1) {\n          return 1;\n        }\n        if ((uint)(pFVar3->iRowid < lVar1) == pIter->bRev) {\n          pIter->iSwitchRowid = lVar1;\n          pFVar3 = pFVar6;\n        }\n        else if (pIter->bRev == (uint)(pIter->iSwitchRowid < lVar1)) {\n          pIter->iSwitchRowid = lVar1;\n        }\n      }\n      pFVar5[(int)uVar4].iFirst = (short)((long)pFVar3 - (long)pIter->aSeg >> 3) * -0x1111;\n      if (uVar4 == 1) break;\n      pFVar5 = pIter->aFirst;\n      pFVar6 = pIter->aSeg + pFVar5[(int)(uVar4 ^ 1)].iFirst;\n    }" { (expression_statement "uVar4 = (int)uVar4 / 2;" (assignment_expression "uVar4 = (int)uVar4 / 2" identifier = (binary_expression "(int)uVar4 / 2" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) / number_literal)) ;) (if_statement "if (pFVar5[(int)uVar4].bTermEq != '\0') {\n        lVar1 = pFVar6->iRowid;\n        if (pFVar3->iRowid == lVar1) {\n          return 1;\n        }\n        if ((uint)(pFVar3->iRowid < lVar1) == pIter->bRev) {\n          pIter->iSwitchRowid = lVar1;\n          pFVar3 = pFVar6;\n        }\n        else if (pIter->bRev == (uint)(pIter->iSwitchRowid < lVar1)) {\n          pIter->iSwitchRowid = lVar1;\n        }\n      }" if (parenthesized_expression "(pFVar5[(int)uVar4].bTermEq != '\0')" ( (binary_expression "pFVar5[(int)uVar4].bTermEq != '\0'" (field_expression "pFVar5[(int)uVar4].bTermEq" (subscript_expression "pFVar5[(int)uVar4]" identifier [ (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) ]) . field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        lVar1 = pFVar6->iRowid;\n        if (pFVar3->iRowid == lVar1) {\n          return 1;\n        }\n        if ((uint)(pFVar3->iRowid < lVar1) == pIter->bRev) {\n          pIter->iSwitchRowid = lVar1;\n          pFVar3 = pFVar6;\n        }\n        else if (pIter->bRev == (uint)(pIter->iSwitchRowid < lVar1)) {\n          pIter->iSwitchRowid = lVar1;\n        }\n      }" { (expression_statement "lVar1 = pFVar6->iRowid;" (assignment_expression "lVar1 = pFVar6->iRowid" identifier = (field_expression "pFVar6->iRowid" identifier -> field_identifier)) ;) (if_statement "if (pFVar3->iRowid == lVar1) {\n          return 1;\n        }" if (parenthesized_expression "(pFVar3->iRowid == lVar1)" ( (binary_expression "pFVar3->iRowid == lVar1" (field_expression "pFVar3->iRowid" identifier -> field_identifier) == identifier) )) (compound_statement "{\n          return 1;\n        }" { (return_statement "return 1;" return number_literal ;) })) (if_statement "if ((uint)(pFVar3->iRowid < lVar1) == pIter->bRev) {\n          pIter->iSwitchRowid = lVar1;\n          pFVar3 = pFVar6;\n        }\n        else if (pIter->bRev == (uint)(pIter->iSwitchRowid < lVar1)) {\n          pIter->iSwitchRowid = lVar1;\n        }" if (parenthesized_expression "((uint)(pFVar3->iRowid < lVar1) == pIter->bRev)" ( (binary_expression "(uint)(pFVar3->iRowid < lVar1) == pIter->bRev" (call_expression "(uint)(pFVar3->iRowid < lVar1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pFVar3->iRowid < lVar1)" ( (binary_expression "pFVar3->iRowid < lVar1" (field_expression "pFVar3->iRowid" identifier -> field_identifier) < identifier) ))) == (field_expression "pIter->bRev" identifier -> field_identifier)) )) (compound_statement "{\n          pIter->iSwitchRowid = lVar1;\n          pFVar3 = pFVar6;\n        }" { (expression_statement "pIter->iSwitchRowid = lVar1;" (assignment_expression "pIter->iSwitchRowid = lVar1" (field_expression "pIter->iSwitchRowid" identifier -> field_identifier) = identifier) ;) (expression_statement "pFVar3 = pFVar6;" (assignment_expression "pFVar3 = pFVar6" identifier = identifier) ;) }) (else_clause "else if (pIter->bRev == (uint)(pIter->iSwitchRowid < lVar1)) {\n          pIter->iSwitchRowid = lVar1;\n        }" else (if_statement "if (pIter->bRev == (uint)(pIter->iSwitchRowid < lVar1)) {\n          pIter->iSwitchRowid = lVar1;\n        }" if (parenthesized_expression "(pIter->bRev == (uint)(pIter->iSwitchRowid < lVar1))" ( (binary_expression "pIter->bRev == (uint)(pIter->iSwitchRowid < lVar1)" (field_expression "pIter->bRev" identifier -> field_identifier) == (call_expression "(uint)(pIter->iSwitchRowid < lVar1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pIter->iSwitchRowid < lVar1)" ( (binary_expression "pIter->iSwitchRowid < lVar1" (field_expression "pIter->iSwitchRowid" identifier -> field_identifier) < identifier) )))) )) (compound_statement "{\n          pIter->iSwitchRowid = lVar1;\n        }" { (expression_statement "pIter->iSwitchRowid = lVar1;" (assignment_expression "pIter->iSwitchRowid = lVar1" (field_expression "pIter->iSwitchRowid" identifier -> field_identifier) = identifier) ;) })))) })) (expression_statement "pFVar5[(int)uVar4].iFirst = (short)((long)pFVar3 - (long)pIter->aSeg >> 3) * -0x1111;" (assignment_expression "pFVar5[(int)uVar4].iFirst = (short)((long)pFVar3 - (long)pIter->aSeg >> 3) * -0x1111" (field_expression "pFVar5[(int)uVar4].iFirst" (subscript_expression "pFVar5[(int)uVar4]" identifier [ (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) ]) . field_identifier) = (binary_expression "(short)((long)pFVar3 - (long)pIter->aSeg >> 3) * -0x1111" (cast_expression "(short)((long)pFVar3 - (long)pIter->aSeg >> 3)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "((long)pFVar3 - (long)pIter->aSeg >> 3)" ( (binary_expression "(long)pFVar3 - (long)pIter->aSeg >> 3" (binary_expression "(long)pFVar3 - (long)pIter->aSeg" (cast_expression "(long)pFVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)pIter->aSeg" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (field_expression "pIter->aSeg" identifier -> field_identifier))) >> number_literal) ))) * number_literal)) ;) (if_statement "if (uVar4 == 1) break;" if (parenthesized_expression "(uVar4 == 1)" ( (binary_expression "uVar4 == 1" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "pFVar5 = pIter->aFirst;" (assignment_expression "pFVar5 = pIter->aFirst" identifier = (field_expression "pIter->aFirst" identifier -> field_identifier)) ;) (expression_statement "pFVar6 = pIter->aSeg + pFVar5[(int)(uVar4 ^ 1)].iFirst;" (assignment_expression "pFVar6 = pIter->aSeg + pFVar5[(int)(uVar4 ^ 1)].iFirst" identifier = (binary_expression "pIter->aSeg + pFVar5[(int)(uVar4 ^ 1)].iFirst" (field_expression "pIter->aSeg" identifier -> field_identifier) + (field_expression "pFVar5[(int)(uVar4 ^ 1)].iFirst" (subscript_expression "pFVar5[(int)(uVar4 ^ 1)]" identifier [ (cast_expression "(int)(uVar4 ^ 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar4 ^ 1)" ( (binary_expression "uVar4 ^ 1" identifier ^ number_literal) ))) ]) . field_identifier))) ;) })) })) (expression_statement "*ppFirst = pFVar3;" (assignment_expression "*ppFirst = pFVar3" (pointer_expression "*ppFirst" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined8 FUN_00115110(long param_1,uint param_2,long *param_3)\n\n{\n  short *psVar1;\n  undefined8 uVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  lVar3 = param_1 + 0x60 + (long)(int)param_2 * 0x78;\n  lVar5 = *(long *)(param_1 + 200 + (long)(int)param_2 * 0x78);\n  if ((lVar5 == *(long *)(param_1 + 0x50)) ||\n     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))) {\n    lVar4 = *(long *)(param_1 + 0x58);\n    uVar2 = 0x8000000000000000;\n    lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;\n    if (*(uint *)(param_1 + 0x44) == 0) {\n      uVar2 = 0x7fffffffffffffff;\n    }\n    param_2 = param_2 + *(int *)(param_1 + 0x40);\n    *(undefined8 *)(param_1 + 0x50) = uVar2;\n    while( true ) {\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }\n  }\n  *param_3 = lVar3;\n  return 0;\n}\n\n" (function_definition "undefined8 FUN_00115110(long param_1,uint param_2,long *param_3)\n\n{\n  short *psVar1;\n  undefined8 uVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  lVar3 = param_1 + 0x60 + (long)(int)param_2 * 0x78;\n  lVar5 = *(long *)(param_1 + 200 + (long)(int)param_2 * 0x78);\n  if ((lVar5 == *(long *)(param_1 + 0x50)) ||\n     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))) {\n    lVar4 = *(long *)(param_1 + 0x58);\n    uVar2 = 0x8000000000000000;\n    lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;\n    if (*(uint *)(param_1 + 0x44) == 0) {\n      uVar2 = 0x7fffffffffffffff;\n    }\n    param_2 = param_2 + *(int *)(param_1 + 0x40);\n    *(undefined8 *)(param_1 + 0x50) = uVar2;\n    while( true ) {\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }\n  }\n  *param_3 = lVar3;\n  return 0;\n}" type_identifier (function_declarator "FUN_00115110(long param_1,uint param_2,long *param_3)" identifier (parameter_list "(long param_1,uint param_2,long *param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "long *param_3" (sized_type_specifier "long" long) (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  short *psVar1;\n  undefined8 uVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  lVar3 = param_1 + 0x60 + (long)(int)param_2 * 0x78;\n  lVar5 = *(long *)(param_1 + 200 + (long)(int)param_2 * 0x78);\n  if ((lVar5 == *(long *)(param_1 + 0x50)) ||\n     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))) {\n    lVar4 = *(long *)(param_1 + 0x58);\n    uVar2 = 0x8000000000000000;\n    lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;\n    if (*(uint *)(param_1 + 0x44) == 0) {\n      uVar2 = 0x7fffffffffffffff;\n    }\n    param_2 = param_2 + *(int *)(param_1 + 0x40);\n    *(undefined8 *)(param_1 + 0x50) = uVar2;\n    while( true ) {\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }\n  }\n  *param_3 = lVar3;\n  return 0;\n}" { (declaration "short *psVar1;" (sized_type_specifier "short" short) (pointer_declarator "*psVar1" * identifier) ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (expression_statement "lVar3 = param_1 + 0x60 + (long)(int)param_2 * 0x78;" (assignment_expression "lVar3 = param_1 + 0x60 + (long)(int)param_2 * 0x78" identifier = (binary_expression "param_1 + 0x60 + (long)(int)param_2 * 0x78" (binary_expression "param_1 + 0x60" identifier + number_literal) + (binary_expression "(long)(int)param_2 * 0x78" (cast_expression "(long)(int)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) * number_literal))) ;) (expression_statement "lVar5 = *(long *)(param_1 + 200 + (long)(int)param_2 * 0x78);" (assignment_expression "lVar5 = *(long *)(param_1 + 200 + (long)(int)param_2 * 0x78)" identifier = (pointer_expression "*(long *)(param_1 + 200 + (long)(int)param_2 * 0x78)" * (cast_expression "(long *)(param_1 + 200 + (long)(int)param_2 * 0x78)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 200 + (long)(int)param_2 * 0x78)" ( (binary_expression "param_1 + 200 + (long)(int)param_2 * 0x78" (binary_expression "param_1 + 200" identifier + number_literal) + (binary_expression "(long)(int)param_2 * 0x78" (cast_expression "(long)(int)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) * number_literal)) ))))) ;) (if_statement "if ((lVar5 == *(long *)(param_1 + 0x50)) ||\n     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))) {\n    lVar4 = *(long *)(param_1 + 0x58);\n    uVar2 = 0x8000000000000000;\n    lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;\n    if (*(uint *)(param_1 + 0x44) == 0) {\n      uVar2 = 0x7fffffffffffffff;\n    }\n    param_2 = param_2 + *(int *)(param_1 + 0x40);\n    *(undefined8 *)(param_1 + 0x50) = uVar2;\n    while( true ) {\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }\n  }" if (parenthesized_expression "((lVar5 == *(long *)(param_1 + 0x50)) ||\n     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44)))" ( (binary_expression "(lVar5 == *(long *)(param_1 + 0x50)) ||\n     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))" (parenthesized_expression "(lVar5 == *(long *)(param_1 + 0x50))" ( (binary_expression "lVar5 == *(long *)(param_1 + 0x50)" identifier == (pointer_expression "*(long *)(param_1 + 0x50)" * (cast_expression "(long *)(param_1 + 0x50)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) ))))) )) || (parenthesized_expression "((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))" ( (binary_expression "(uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44)" (call_expression "(uint)(lVar5 < *(long *)(param_1 + 0x50))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(lVar5 < *(long *)(param_1 + 0x50))" ( (binary_expression "lVar5 < *(long *)(param_1 + 0x50)" identifier < (pointer_expression "*(long *)(param_1 + 0x50)" * (cast_expression "(long *)(param_1 + 0x50)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) ))))) ))) == (pointer_expression "*(uint *)(param_1 + 0x44)" * (cast_expression "(uint *)(param_1 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) ))))) ))) )) (compound_statement "{\n    lVar4 = *(long *)(param_1 + 0x58);\n    uVar2 = 0x8000000000000000;\n    lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;\n    if (*(uint *)(param_1 + 0x44) == 0) {\n      uVar2 = 0x7fffffffffffffff;\n    }\n    param_2 = param_2 + *(int *)(param_1 + 0x40);\n    *(undefined8 *)(param_1 + 0x50) = uVar2;\n    while( true ) {\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }\n  }" { (expression_statement "lVar4 = *(long *)(param_1 + 0x58);" (assignment_expression "lVar4 = *(long *)(param_1 + 0x58)" identifier = (pointer_expression "*(long *)(param_1 + 0x58)" * (cast_expression "(long *)(param_1 + 0x58)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x58)" ( (binary_expression "param_1 + 0x58" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = 0x8000000000000000;" (assignment_expression "uVar2 = 0x8000000000000000" identifier = number_literal) ;) (expression_statement "lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;" (assignment_expression "lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78" identifier = (binary_expression "param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78" (binary_expression "param_1 + 0x60" identifier + number_literal) + (binary_expression "(long)(int)(param_2 ^ 1) * 0x78" (cast_expression "(long)(int)(param_2 ^ 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(param_2 ^ 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(param_2 ^ 1)" ( (binary_expression "param_2 ^ 1" identifier ^ number_literal) )))) * number_literal))) ;) (if_statement "if (*(uint *)(param_1 + 0x44) == 0) {\n      uVar2 = 0x7fffffffffffffff;\n    }" if (parenthesized_expression "(*(uint *)(param_1 + 0x44) == 0)" ( (binary_expression "*(uint *)(param_1 + 0x44) == 0" (pointer_expression "*(uint *)(param_1 + 0x44)" * (cast_expression "(uint *)(param_1 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      uVar2 = 0x7fffffffffffffff;\n    }" { (expression_statement "uVar2 = 0x7fffffffffffffff;" (assignment_expression "uVar2 = 0x7fffffffffffffff" identifier = number_literal) ;) })) (expression_statement "param_2 = param_2 + *(int *)(param_1 + 0x40);" (assignment_expression "param_2 = param_2 + *(int *)(param_1 + 0x40)" identifier = (binary_expression "param_2 + *(int *)(param_1 + 0x40)" identifier + (pointer_expression "*(int *)(param_1 + 0x40)" * (cast_expression "(int *)(param_1 + 0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))))) ;) (expression_statement "*(undefined8 *)(param_1 + 0x50) = uVar2;" (assignment_expression "*(undefined8 *)(param_1 + 0x50) = uVar2" (pointer_expression "*(undefined8 *)(param_1 + 0x50)" * (cast_expression "(undefined8 *)(param_1 + 0x50)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) = identifier) ;) (while_statement "while( true ) {\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }" { (expression_statement "param_2 = (int)param_2 / 2;" (assignment_expression "param_2 = (int)param_2 / 2" identifier = (binary_expression "(int)param_2 / 2" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) / number_literal)) ;) (expression_statement "psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);" (assignment_expression "psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4)" identifier = (cast_expression "(short *)(lVar4 + (long)(int)param_2 * 4)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar4 + (long)(int)param_2 * 4)" ( (binary_expression "lVar4 + (long)(int)param_2 * 4" identifier + (binary_expression "(long)(int)param_2 * 4" (cast_expression "(long)(int)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) * number_literal)) )))) ;) (if_statement "if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }" if (parenthesized_expression "((char)psVar1[1] != '\0')" ( (binary_expression "(char)psVar1[1] != '\0'" (cast_expression "(char)psVar1[1]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "psVar1[1]" identifier [ number_literal ])) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }" { (expression_statement "lVar4 = *(long *)(lVar5 + 0x68);" (assignment_expression "lVar4 = *(long *)(lVar5 + 0x68)" identifier = (pointer_expression "*(long *)(lVar5 + 0x68)" * (cast_expression "(long *)(lVar5 + 0x68)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar5 + 0x68)" ( (binary_expression "lVar5 + 0x68" identifier + number_literal) ))))) ;) (if_statement "if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }" if (parenthesized_expression "(*(long *)(lVar3 + 0x68) == lVar4)" ( (binary_expression "*(long *)(lVar3 + 0x68) == lVar4" (pointer_expression "*(long *)(lVar3 + 0x68)" * (cast_expression "(long *)(lVar3 + 0x68)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x68)" ( (binary_expression "lVar3 + 0x68" identifier + number_literal) )))) == identifier) )) (compound_statement "{\n          return 1;\n        }" { (return_statement "return 1;" return number_literal ;) })) (if_statement "if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }" if (parenthesized_expression "((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44))" ( (binary_expression "(uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)" (call_expression "(uint)(*(long *)(lVar3 + 0x68) < lVar4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*(long *)(lVar3 + 0x68) < lVar4)" ( (binary_expression "*(long *)(lVar3 + 0x68) < lVar4" (pointer_expression "*(long *)(lVar3 + 0x68)" * (cast_expression "(long *)(lVar3 + 0x68)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar3 + 0x68)" ( (binary_expression "lVar3 + 0x68" identifier + number_literal) )))) < identifier) ))) == (pointer_expression "*(uint *)(param_1 + 0x44)" * (cast_expression "(uint *)(param_1 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) ))))) )) (compound_statement "{\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }" { (expression_statement "*(long *)(param_1 + 0x50) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x50) = lVar4" (pointer_expression "*(long *)(param_1 + 0x50)" * (cast_expression "(long *)(param_1 + 0x50)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) = identifier) ;) (expression_statement "lVar3 = lVar5;" (assignment_expression "lVar3 = lVar5" identifier = identifier) ;) }) (else_clause "else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }" else (if_statement "if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }" if (parenthesized_expression "(*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4))" ( (binary_expression "*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)" (pointer_expression "*(uint *)(param_1 + 0x44)" * (cast_expression "(uint *)(param_1 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) == (call_expression "(uint)(*(long *)(param_1 + 0x50) < lVar4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*(long *)(param_1 + 0x50) < lVar4)" ( (binary_expression "*(long *)(param_1 + 0x50) < lVar4" (pointer_expression "*(long *)(param_1 + 0x50)" * (cast_expression "(long *)(param_1 + 0x50)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) < identifier) )))) )) (compound_statement "{\n          *(long *)(param_1 + 0x50) = lVar4;\n        }" { (expression_statement "*(long *)(param_1 + 0x50) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x50) = lVar4" (pointer_expression "*(long *)(param_1 + 0x50)" * (cast_expression "(long *)(param_1 + 0x50)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) = identifier) ;) })))) })) (expression_statement "*psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;" (assignment_expression "*psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111" (pointer_expression "*psVar1" * identifier) = (binary_expression "(short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111" (cast_expression "(short)(lVar3 - (param_1 + 0x60) >> 3)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "(lVar3 - (param_1 + 0x60) >> 3)" ( (binary_expression "lVar3 - (param_1 + 0x60) >> 3" (binary_expression "lVar3 - (param_1 + 0x60)" identifier - (parenthesized_expression "(param_1 + 0x60)" ( (binary_expression "param_1 + 0x60" identifier + number_literal) ))) >> number_literal) ))) * number_literal)) ;) (if_statement "if (param_2 == 1) break;" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar4 = *(long *)(param_1 + 0x58);" (assignment_expression "lVar4 = *(long *)(param_1 + 0x58)" identifier = (pointer_expression "*(long *)(param_1 + 0x58)" * (cast_expression "(long *)(param_1 + 0x58)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x58)" ( (binary_expression "param_1 + 0x58" identifier + number_literal) ))))) ;) (expression_statement "lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;" (assignment_expression "lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78" identifier = (binary_expression "param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78" (binary_expression "param_1 + 0x60" identifier + number_literal) + (binary_expression "(ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78" (binary_expression "(ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4)" (parenthesized_expression "(ulong)" ( identifier )) * (cast_expression "(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar4 + (long)(int)(param_2 ^ 1) * 4)" ( (binary_expression "lVar4 + (long)(int)(param_2 ^ 1) * 4" identifier + (binary_expression "(long)(int)(param_2 ^ 1) * 4" (cast_expression "(long)(int)(param_2 ^ 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(param_2 ^ 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(param_2 ^ 1)" ( (binary_expression "param_2 ^ 1" identifier ^ number_literal) )))) * number_literal)) )))) * number_literal))) ;) })) })) (expression_statement "*param_3 = lVar3;" (assignment_expression "*param_3 = lVar3" (pointer_expression "*param_3" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) ))) (compound_statement { (declaration (sized_type_specifier short) (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) * LIT))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) * LIT)) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) || (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT ^ LIT) )))) * LIT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) / LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) * LIT)) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == IDENT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < IDENT) ))) == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < IDENT) )))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) })))) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier short)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT - (parenthesized_expression ( (binary_expression IDENT + LIT) ))) >> LIT) ))) * LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) + (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT ^ LIT) )))) * LIT)) )))) * LIT))) ;) })) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return LIT ;) })))
(function_definition "undefined8 FUN_00115110(long param_1,uint param_2,long *param_3)\n\n{\n  short *psVar1;\n  undefined8 uVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  lVar3 = param_1 + 0x60 + (long)(int)param_2 * 0x78;\n  lVar5 = *(long *)(param_1 + 200 + (long)(int)param_2 * 0x78);\n  if ((lVar5 == *(long *)(param_1 + 0x50)) ||\n     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))) {\n    lVar4 = *(long *)(param_1 + 0x58);\n    uVar2 = 0x8000000000000000;\n    lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;\n    if (*(uint *)(param_1 + 0x44) == 0) {\n      uVar2 = 0x7fffffffffffffff;\n    }\n    param_2 = param_2 + *(int *)(param_1 + 0x40);\n    *(undefined8 *)(param_1 + 0x50) = uVar2;\n    while( true ) {\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }\n  }\n  *param_3 = lVar3;\n  return 0;\n}" (type_identifier "undefined8") (function_declarator "FUN_00115110(long param_1,uint param_2,long *param_3)" (identifier "FUN_00115110") (parameter_list "(long param_1,uint param_2,long *param_3)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "long *param_3" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  short *psVar1;\n  undefined8 uVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  lVar3 = param_1 + 0x60 + (long)(int)param_2 * 0x78;\n  lVar5 = *(long *)(param_1 + 200 + (long)(int)param_2 * 0x78);\n  if ((lVar5 == *(long *)(param_1 + 0x50)) ||\n     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))) {\n    lVar4 = *(long *)(param_1 + 0x58);\n    uVar2 = 0x8000000000000000;\n    lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;\n    if (*(uint *)(param_1 + 0x44) == 0) {\n      uVar2 = 0x7fffffffffffffff;\n    }\n    param_2 = param_2 + *(int *)(param_1 + 0x40);\n    *(undefined8 *)(param_1 + 0x50) = uVar2;\n    while( true ) {\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }\n  }\n  *param_3 = lVar3;\n  return 0;\n}" ({ "{") (declaration "short *psVar1;" (sized_type_specifier "short" (short "short")) (pointer_declarator "*psVar1" (* "*") (identifier "psVar1")) (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (declaration "long lVar3;" (sized_type_specifier "long" (long "long")) (identifier "lVar3") (; ";")) (declaration "long lVar4;" (sized_type_specifier "long" (long "long")) (identifier "lVar4") (; ";")) (declaration "long lVar5;" (sized_type_specifier "long" (long "long")) (identifier "lVar5") (; ";")) (expression_statement "lVar3 = param_1 + 0x60 + (long)(int)param_2 * 0x78;" (assignment_expression "lVar3 = param_1 + 0x60 + (long)(int)param_2 * 0x78" (identifier "lVar3") (= "=") (binary_expression "param_1 + 0x60 + (long)(int)param_2 * 0x78" (binary_expression "param_1 + 0x60" (identifier "param_1") (+ "+") (number_literal "0x60")) (+ "+") (binary_expression "(long)(int)param_2 * 0x78" (cast_expression "(long)(int)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) (* "*") (number_literal "0x78")))) (; ";")) (expression_statement "lVar5 = *(long *)(param_1 + 200 + (long)(int)param_2 * 0x78);" (assignment_expression "lVar5 = *(long *)(param_1 + 200 + (long)(int)param_2 * 0x78)" (identifier "lVar5") (= "=") (pointer_expression "*(long *)(param_1 + 200 + (long)(int)param_2 * 0x78)" (* "*") (cast_expression "(long *)(param_1 + 200 + (long)(int)param_2 * 0x78)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 200 + (long)(int)param_2 * 0x78)" (( "(") (binary_expression "param_1 + 200 + (long)(int)param_2 * 0x78" (binary_expression "param_1 + 200" (identifier "param_1") (+ "+") (number_literal "200")) (+ "+") (binary_expression "(long)(int)param_2 * 0x78" (cast_expression "(long)(int)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) (* "*") (number_literal "0x78"))) () ")"))))) (; ";")) (if_statement "if ((lVar5 == *(long *)(param_1 + 0x50)) ||\n     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))) {\n    lVar4 = *(long *)(param_1 + 0x58);\n    uVar2 = 0x8000000000000000;\n    lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;\n    if (*(uint *)(param_1 + 0x44) == 0) {\n      uVar2 = 0x7fffffffffffffff;\n    }\n    param_2 = param_2 + *(int *)(param_1 + 0x40);\n    *(undefined8 *)(param_1 + 0x50) = uVar2;\n    while( true ) {\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }\n  }" (if "if") (parenthesized_expression "((lVar5 == *(long *)(param_1 + 0x50)) ||\n     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44)))" (( "(") (binary_expression "(lVar5 == *(long *)(param_1 + 0x50)) ||\n     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))" (parenthesized_expression "(lVar5 == *(long *)(param_1 + 0x50))" (( "(") (binary_expression "lVar5 == *(long *)(param_1 + 0x50)" (identifier "lVar5") (== "==") (pointer_expression "*(long *)(param_1 + 0x50)" (* "*") (cast_expression "(long *)(param_1 + 0x50)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")"))))) () ")")) (|| "||") (parenthesized_expression "((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))" (( "(") (binary_expression "(uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44)" (call_expression "(uint)(lVar5 < *(long *)(param_1 + 0x50))" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(lVar5 < *(long *)(param_1 + 0x50))" (( "(") (binary_expression "lVar5 < *(long *)(param_1 + 0x50)" (identifier "lVar5") (< "<") (pointer_expression "*(long *)(param_1 + 0x50)" (* "*") (cast_expression "(long *)(param_1 + 0x50)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")"))))) () ")"))) (== "==") (pointer_expression "*(uint *)(param_1 + 0x44)" (* "*") (cast_expression "(uint *)(param_1 + 0x44)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x44)" (( "(") (binary_expression "param_1 + 0x44" (identifier "param_1") (+ "+") (number_literal "0x44")) () ")"))))) () ")"))) () ")")) (compound_statement "{\n    lVar4 = *(long *)(param_1 + 0x58);\n    uVar2 = 0x8000000000000000;\n    lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;\n    if (*(uint *)(param_1 + 0x44) == 0) {\n      uVar2 = 0x7fffffffffffffff;\n    }\n    param_2 = param_2 + *(int *)(param_1 + 0x40);\n    *(undefined8 *)(param_1 + 0x50) = uVar2;\n    while( true ) {\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }\n  }" ({ "{") (expression_statement "lVar4 = *(long *)(param_1 + 0x58);" (assignment_expression "lVar4 = *(long *)(param_1 + 0x58)" (identifier "lVar4") (= "=") (pointer_expression "*(long *)(param_1 + 0x58)" (* "*") (cast_expression "(long *)(param_1 + 0x58)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x58)" (( "(") (binary_expression "param_1 + 0x58" (identifier "param_1") (+ "+") (number_literal "0x58")) () ")"))))) (; ";")) (expression_statement "uVar2 = 0x8000000000000000;" (assignment_expression "uVar2 = 0x8000000000000000" (identifier "uVar2") (= "=") (number_literal "0x8000000000000000")) (; ";")) (expression_statement "lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;" (assignment_expression "lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78" (identifier "lVar5") (= "=") (binary_expression "param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78" (binary_expression "param_1 + 0x60" (identifier "param_1") (+ "+") (number_literal "0x60")) (+ "+") (binary_expression "(long)(int)(param_2 ^ 1) * 0x78" (cast_expression "(long)(int)(param_2 ^ 1)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)(param_2 ^ 1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(param_2 ^ 1)" (( "(") (binary_expression "param_2 ^ 1" (identifier "param_2") (^ "^") (number_literal "1")) () ")")))) (* "*") (number_literal "0x78")))) (; ";")) (if_statement "if (*(uint *)(param_1 + 0x44) == 0) {\n      uVar2 = 0x7fffffffffffffff;\n    }" (if "if") (parenthesized_expression "(*(uint *)(param_1 + 0x44) == 0)" (( "(") (binary_expression "*(uint *)(param_1 + 0x44) == 0" (pointer_expression "*(uint *)(param_1 + 0x44)" (* "*") (cast_expression "(uint *)(param_1 + 0x44)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x44)" (( "(") (binary_expression "param_1 + 0x44" (identifier "param_1") (+ "+") (number_literal "0x44")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar2 = 0x7fffffffffffffff;\n    }" ({ "{") (expression_statement "uVar2 = 0x7fffffffffffffff;" (assignment_expression "uVar2 = 0x7fffffffffffffff" (identifier "uVar2") (= "=") (number_literal "0x7fffffffffffffff")) (; ";")) (} "}"))) (expression_statement "param_2 = param_2 + *(int *)(param_1 + 0x40);" (assignment_expression "param_2 = param_2 + *(int *)(param_1 + 0x40)" (identifier "param_2") (= "=") (binary_expression "param_2 + *(int *)(param_1 + 0x40)" (identifier "param_2") (+ "+") (pointer_expression "*(int *)(param_1 + 0x40)" (* "*") (cast_expression "(int *)(param_1 + 0x40)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")")))))) (; ";")) (expression_statement "*(undefined8 *)(param_1 + 0x50) = uVar2;" (assignment_expression "*(undefined8 *)(param_1 + 0x50) = uVar2" (pointer_expression "*(undefined8 *)(param_1 + 0x50)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x50)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (while_statement "while( true ) {\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      param_2 = (int)param_2 / 2;\n      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);\n      if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }\n      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;\n      if (param_2 == 1) break;\n      lVar4 = *(long *)(param_1 + 0x58);\n      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;\n    }" ({ "{") (expression_statement "param_2 = (int)param_2 / 2;" (assignment_expression "param_2 = (int)param_2 / 2" (identifier "param_2") (= "=") (binary_expression "(int)param_2 / 2" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (/ "/") (number_literal "2"))) (; ";")) (expression_statement "psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);" (assignment_expression "psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4)" (identifier "psVar1") (= "=") (cast_expression "(short *)(lVar4 + (long)(int)param_2 * 4)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar4 + (long)(int)param_2 * 4)" (( "(") (binary_expression "lVar4 + (long)(int)param_2 * 4" (identifier "lVar4") (+ "+") (binary_expression "(long)(int)param_2 * 4" (cast_expression "(long)(int)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) (* "*") (number_literal "4"))) () ")")))) (; ";")) (if_statement "if ((char)psVar1[1] != '\0') {\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }" (if "if") (parenthesized_expression "((char)psVar1[1] != '\0')" (( "(") (binary_expression "(char)psVar1[1] != '\0'" (cast_expression "(char)psVar1[1]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "psVar1[1]" (identifier "psVar1") ([ "[") (number_literal "1") (] "]"))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        lVar4 = *(long *)(lVar5 + 0x68);\n        if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }\n        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }\n      }" ({ "{") (expression_statement "lVar4 = *(long *)(lVar5 + 0x68);" (assignment_expression "lVar4 = *(long *)(lVar5 + 0x68)" (identifier "lVar4") (= "=") (pointer_expression "*(long *)(lVar5 + 0x68)" (* "*") (cast_expression "(long *)(lVar5 + 0x68)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar5 + 0x68)" (( "(") (binary_expression "lVar5 + 0x68" (identifier "lVar5") (+ "+") (number_literal "0x68")) () ")"))))) (; ";")) (if_statement "if (*(long *)(lVar3 + 0x68) == lVar4) {\n          return 1;\n        }" (if "if") (parenthesized_expression "(*(long *)(lVar3 + 0x68) == lVar4)" (( "(") (binary_expression "*(long *)(lVar3 + 0x68) == lVar4" (pointer_expression "*(long *)(lVar3 + 0x68)" (* "*") (cast_expression "(long *)(lVar3 + 0x68)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x68)" (( "(") (binary_expression "lVar3 + 0x68" (identifier "lVar3") (+ "+") (number_literal "0x68")) () ")")))) (== "==") (identifier "lVar4")) () ")")) (compound_statement "{\n          return 1;\n        }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (if_statement "if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }\n        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }" (if "if") (parenthesized_expression "((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44))" (( "(") (binary_expression "(uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)" (call_expression "(uint)(*(long *)(lVar3 + 0x68) < lVar4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*(long *)(lVar3 + 0x68) < lVar4)" (( "(") (binary_expression "*(long *)(lVar3 + 0x68) < lVar4" (pointer_expression "*(long *)(lVar3 + 0x68)" (* "*") (cast_expression "(long *)(lVar3 + 0x68)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar3 + 0x68)" (( "(") (binary_expression "lVar3 + 0x68" (identifier "lVar3") (+ "+") (number_literal "0x68")) () ")")))) (< "<") (identifier "lVar4")) () ")"))) (== "==") (pointer_expression "*(uint *)(param_1 + 0x44)" (* "*") (cast_expression "(uint *)(param_1 + 0x44)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x44)" (( "(") (binary_expression "param_1 + 0x44" (identifier "param_1") (+ "+") (number_literal "0x44")) () ")"))))) () ")")) (compound_statement "{\n          *(long *)(param_1 + 0x50) = lVar4;\n          lVar3 = lVar5;\n        }" ({ "{") (expression_statement "*(long *)(param_1 + 0x50) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x50) = lVar4" (pointer_expression "*(long *)(param_1 + 0x50)" (* "*") (cast_expression "(long *)(param_1 + 0x50)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")")))) (= "=") (identifier "lVar4")) (; ";")) (expression_statement "lVar3 = lVar5;" (assignment_expression "lVar3 = lVar5" (identifier "lVar3") (= "=") (identifier "lVar5")) (; ";")) (} "}")) (else_clause "else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }" (else "else") (if_statement "if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {\n          *(long *)(param_1 + 0x50) = lVar4;\n        }" (if "if") (parenthesized_expression "(*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4))" (( "(") (binary_expression "*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)" (pointer_expression "*(uint *)(param_1 + 0x44)" (* "*") (cast_expression "(uint *)(param_1 + 0x44)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x44)" (( "(") (binary_expression "param_1 + 0x44" (identifier "param_1") (+ "+") (number_literal "0x44")) () ")")))) (== "==") (call_expression "(uint)(*(long *)(param_1 + 0x50) < lVar4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*(long *)(param_1 + 0x50) < lVar4)" (( "(") (binary_expression "*(long *)(param_1 + 0x50) < lVar4" (pointer_expression "*(long *)(param_1 + 0x50)" (* "*") (cast_expression "(long *)(param_1 + 0x50)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")")))) (< "<") (identifier "lVar4")) () ")")))) () ")")) (compound_statement "{\n          *(long *)(param_1 + 0x50) = lVar4;\n        }" ({ "{") (expression_statement "*(long *)(param_1 + 0x50) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x50) = lVar4" (pointer_expression "*(long *)(param_1 + 0x50)" (* "*") (cast_expression "(long *)(param_1 + 0x50)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")")))) (= "=") (identifier "lVar4")) (; ";")) (} "}"))))) (} "}"))) (expression_statement "*psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;" (assignment_expression "*psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111" (pointer_expression "*psVar1" (* "*") (identifier "psVar1")) (= "=") (binary_expression "(short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111" (cast_expression "(short)(lVar3 - (param_1 + 0x60) >> 3)" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (parenthesized_expression "(lVar3 - (param_1 + 0x60) >> 3)" (( "(") (binary_expression "lVar3 - (param_1 + 0x60) >> 3" (binary_expression "lVar3 - (param_1 + 0x60)" (identifier "lVar3") (- "-") (parenthesized_expression "(param_1 + 0x60)" (( "(") (binary_expression "param_1 + 0x60" (identifier "param_1") (+ "+") (number_literal "0x60")) () ")"))) (>> ">>") (number_literal "3")) () ")"))) (* "*") (number_literal "-0x1111"))) (; ";")) (if_statement "if (param_2 == 1) break;" (if "if") (parenthesized_expression "(param_2 == 1)" (( "(") (binary_expression "param_2 == 1" (identifier "param_2") (== "==") (number_literal "1")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "lVar4 = *(long *)(param_1 + 0x58);" (assignment_expression "lVar4 = *(long *)(param_1 + 0x58)" (identifier "lVar4") (= "=") (pointer_expression "*(long *)(param_1 + 0x58)" (* "*") (cast_expression "(long *)(param_1 + 0x58)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x58)" (( "(") (binary_expression "param_1 + 0x58" (identifier "param_1") (+ "+") (number_literal "0x58")) () ")"))))) (; ";")) (expression_statement "lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;" (assignment_expression "lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78" (identifier "lVar5") (= "=") (binary_expression "param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78" (binary_expression "param_1 + 0x60" (identifier "param_1") (+ "+") (number_literal "0x60")) (+ "+") (binary_expression "(ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78" (binary_expression "(ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (* "*") (cast_expression "(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar4 + (long)(int)(param_2 ^ 1) * 4)" (( "(") (binary_expression "lVar4 + (long)(int)(param_2 ^ 1) * 4" (identifier "lVar4") (+ "+") (binary_expression "(long)(int)(param_2 ^ 1) * 4" (cast_expression "(long)(int)(param_2 ^ 1)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)(param_2 ^ 1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(param_2 ^ 1)" (( "(") (binary_expression "param_2 ^ 1" (identifier "param_2") (^ "^") (number_literal "1")) () ")")))) (* "*") (number_literal "4"))) () ")")))) (* "*") (number_literal "0x78")))) (; ";")) (} "}"))) (} "}"))) (expression_statement "*param_3 = lVar3;" (assignment_expression "*param_3 = lVar3" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "lVar3")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

int function_1(type_1 *pIter,int var_1,type_2 **ppFirst)

{
  long var_2;
  type_3 iVar2;
  type_2 *pFVar3;
  type_4 var_3;
  type_5 *pFVar5;
  type_2 *pFVar6;
  
  pFVar3 = pIter->aSeg + var_1;
  var_2 = pIter->aSeg[var_1].iRowid;
  if ((var_2 == pIter->iSwitchRowid) || ((type_4)(var_2 < pIter->iSwitchRowid) == pIter->bRev)) {
    pFVar5 = pIter->aFirst;
    iVar2 = -0x8000000000000000;
    pFVar6 = pIter->aSeg + (int)(var_1 ^ 1);
    if (pIter->bRev == 0) {
      iVar2 = 0x7fffffffffffffff;
    }
    var_3 = var_1 + pIter->nSeg;
    pIter->iSwitchRowid = iVar2;
    while( true ) {
      var_3 = (int)var_3 / 2;
      if (pFVar5[(int)var_3].bTermEq != '\0') {
        var_2 = pFVar6->iRowid;
        if (pFVar3->iRowid == var_2) {
          return 1;
        }
        if ((type_4)(pFVar3->iRowid < var_2) == pIter->bRev) {
          pIter->iSwitchRowid = var_2;
          pFVar3 = pFVar6;
        }
        else if (pIter->bRev == (type_4)(pIter->iSwitchRowid < var_2)) {
          pIter->iSwitchRowid = var_2;
        }
      }
      pFVar5[(int)var_3].iFirst = (short)((long)pFVar3 - (long)pIter->aSeg >> 3) * -0x1111;
      if (var_3 == 1) break;
      pFVar5 = pIter->aFirst;
      pFVar6 = pIter->aSeg + pFVar5[(int)(var_3 ^ 1)].iFirst;
    }
  }
  *ppFirst = pFVar3;
  return 0;
}


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

undefined8 MASKED(long param_1,uint param_2,long *param_3)

{
  short *psVar1;
  undefined8 uVar2;
  long lVar3;
  long lVar4;
  long lVar5;
  
  lVar3 = param_1 + 0x60 + (long)(int)param_2 * 0x78;
  lVar5 = *(long *)(param_1 + 200 + (long)(int)param_2 * 0x78);
  if ((lVar5 == *(long *)(param_1 + 0x50)) ||
     ((uint)(lVar5 < *(long *)(param_1 + 0x50)) == *(uint *)(param_1 + 0x44))) {
    lVar4 = *(long *)(param_1 + 0x58);
    uVar2 = 0x8000000000000000;
    lVar5 = param_1 + 0x60 + (long)(int)(param_2 ^ 1) * 0x78;
    if (*(uint *)(param_1 + 0x44) == 0) {
      uVar2 = 0x7fffffffffffffff;
    }
    param_2 = param_2 + *(int *)(param_1 + 0x40);
    *(undefined8 *)(param_1 + 0x50) = uVar2;
    while( true ) {
      param_2 = (int)param_2 / 2;
      psVar1 = (short *)(lVar4 + (long)(int)param_2 * 4);
      if ((char)psVar1[1] != '\0') {
        lVar4 = *(long *)(lVar5 + 0x68);
        if (*(long *)(lVar3 + 0x68) == lVar4) {
          return 1;
        }
        if ((uint)(*(long *)(lVar3 + 0x68) < lVar4) == *(uint *)(param_1 + 0x44)) {
          *(long *)(param_1 + 0x50) = lVar4;
          lVar3 = lVar5;
        }
        else if (*(uint *)(param_1 + 0x44) == (uint)(*(long *)(param_1 + 0x50) < lVar4)) {
          *(long *)(param_1 + 0x50) = lVar4;
        }
      }
      *psVar1 = (short)(lVar3 - (param_1 + 0x60) >> 3) * -0x1111;
      if (param_2 == 1) break;
      lVar4 = *(long *)(param_1 + 0x58);
      lVar5 = param_1 + 0x60 + (ulong)*(ushort *)(lVar4 + (long)(int)(param_2 ^ 1) * 4) * 0x78;
    }
  }
  *param_3 = lVar3;
  return 0;
}

